 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKMonitor/MonitorModel.h>

@implementation WidgetRawResource
-(id) initWithName:(NSString*) name
      regionId:(NSString*)regionId
      resourceId:(NSString*)resourceId
      tag:(NSMutableDictionary<NSString*,NSString*>*)tag { 
     self.name = name;               
     self.regionId = regionId;               
     self.resourceId = resourceId;               
     self.tag = tag;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self regionId])
    {
        [result setValue:[self regionId] forKey:@"regionId"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.regionId = [dictionary objectForKey:@"regionId"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.tag = [dictionary objectForKey:@"tag"];
    return self;
}
 @end
@implementation MetricCm
-(id) initWithAggrPeriod:(NSString*) aggrPeriod
      aggrType:(NSString*)aggrType
      calculateUnit:(NSString*)calculateUnit
      downSampleType:(NSString*)downSampleType
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      metricUID:(NSString*)metricUID
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.aggrPeriod = aggrPeriod;               
     self.aggrType = aggrType;               
     self.calculateUnit = calculateUnit;               
     self.downSampleType = downSampleType;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.metricUID = metricUID;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggrPeriod])
    {
        [result setValue:[self aggrPeriod] forKey:@"aggrPeriod"];
    }
    if([self aggrType])
    {
        [result setValue:[self aggrType] forKey:@"aggrType"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self downSampleType])
    {
        [result setValue:[self downSampleType] forKey:@"downSampleType"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self metricUID])
    {
        [result setValue:[self metricUID] forKey:@"metricUID"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggrPeriod = [dictionary objectForKey:@"aggrPeriod"];
    self.aggrType = [dictionary objectForKey:@"aggrType"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.downSampleType = [dictionary objectForKey:@"downSampleType"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.metricUID = [dictionary objectForKey:@"metricUID"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation MonitorFilter
-(id) initWithName:(NSString*) name
      values:(NSArray<NSString*>*)values { 
     self.name = name;               
     self.values = values;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.values = [dictionary objectForKey:@"values"];
    return self;
}
 @end
@implementation UpdateTemplateResponseEnd
-(id) initWithSuccess:(NSNumber*) success
      templateId:(NSNumber*)templateId { 
     self.success = success;               
     self.templateId = templateId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.success = [dictionary objectForKey:@"success"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    return self;
}
 @end
@implementation TemplateOption
-(id) initWithTemplateId:(NSString*) templateId
      templateType:(NSNumber*)templateType { 
     self.templateId = templateId;               
     self.templateType = templateType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    if([self templateType])
    {
        [result setValue:[self templateType] forKey:@"templateType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.templateId = [dictionary objectForKey:@"templateId"];
    self.templateType = [dictionary objectForKey:@"templateType"];
    return self;
}
 @end
@implementation RuleCounting
-(id) initWithAlarmRuleCount:(NSNumber*) alarmRuleCount
      disableRuleCount:(NSNumber*)disableRuleCount
      normalRuleCount:(NSNumber*)normalRuleCount
      product:(NSString*)product
      totalRuleCount:(NSNumber*)totalRuleCount
      unknownRuleCount:(NSNumber*)unknownRuleCount { 
     self.alarmRuleCount = alarmRuleCount;               
     self.disableRuleCount = disableRuleCount;               
     self.normalRuleCount = normalRuleCount;               
     self.product = product;               
     self.totalRuleCount = totalRuleCount;               
     self.unknownRuleCount = unknownRuleCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmRuleCount])
    {
        [result setValue:[self alarmRuleCount] forKey:@"alarmRuleCount"];
    }
    if([self disableRuleCount])
    {
        [result setValue:[self disableRuleCount] forKey:@"disableRuleCount"];
    }
    if([self normalRuleCount])
    {
        [result setValue:[self normalRuleCount] forKey:@"normalRuleCount"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self totalRuleCount])
    {
        [result setValue:[self totalRuleCount] forKey:@"totalRuleCount"];
    }
    if([self unknownRuleCount])
    {
        [result setValue:[self unknownRuleCount] forKey:@"unknownRuleCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmRuleCount = [dictionary objectForKey:@"alarmRuleCount"];
    self.disableRuleCount = [dictionary objectForKey:@"disableRuleCount"];
    self.normalRuleCount = [dictionary objectForKey:@"normalRuleCount"];
    self.product = [dictionary objectForKey:@"product"];
    self.totalRuleCount = [dictionary objectForKey:@"totalRuleCount"];
    self.unknownRuleCount = [dictionary objectForKey:@"unknownRuleCount"];
    return self;
}
 @end
@implementation NoticeLevel
-(id) initWithCustom:(NSNumber*) custom
      levels:(NSMutableDictionary<NSString*,NSNumber*>*)levels { 
     self.custom = custom;               
     self.levels = levels;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self custom])
    {
        [result setValue:[self custom] forKey:@"custom"];
    }
    if([self levels])
    {
        [result setValue:[self levels] forKey:@"levels"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.custom = [dictionary objectForKey:@"custom"];
    self.levels = [dictionary objectForKey:@"levels"];
    return self;
}
 @end
@implementation CmAlarmHistory
-(id) initWithCalculation:(NSString*) calculation
      contactGroups:(NSArray<NSString*>*)contactGroups
      contactPersons:(NSArray<NSString*>*)contactPersons
      deleted:(NSNumber*)deleted
      enabled:(NSNumber*)enabled
      idValue:(NSString*)idValue
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      namespace:(NSString*)namespace
      namespaceUID:(NSString*)namespaceUID
      noticePeriod:(NSNumber*)noticePeriod
      noticeTime:(NSString*)noticeTime
      obj:(NSString*)obj
      objUID:(NSString*)objUID
      operation:(NSString*)operation
      period:(NSNumber*)period
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      rootRuleId:(NSNumber*)rootRuleId
      ruleId:(NSNumber*)ruleId
      ruleName:(NSString*)ruleName
      serviceCode:(NSString*)serviceCode
      tag:(NSString*)tag
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times
      value:(NSNumber*)value { 
     self.calculation = calculation;               
     self.contactGroups = contactGroups;               
     self.contactPersons = contactPersons;               
     self.deleted = deleted;               
     self.enabled = enabled;               
     self.idValue = idValue;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.namespace = namespace;               
     self.namespaceUID = namespaceUID;               
     self.noticePeriod = noticePeriod;               
     self.noticeTime = noticeTime;               
     self.obj = obj;               
     self.objUID = objUID;               
     self.operation = operation;               
     self.period = period;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.rootRuleId = rootRuleId;               
     self.ruleId = ruleId;               
     self.ruleName = ruleName;               
     self.serviceCode = serviceCode;               
     self.tag = tag;               
     self.threshold = threshold;               
     self.times = times;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self contactGroups])
    {
        [result setValue:[self contactGroups] forKey:@"contactGroups"];
    }
    if([self contactPersons])
    {
        [result setValue:[self contactPersons] forKey:@"contactPersons"];
    }
    if([self deleted])
    {
        [result setValue:[self deleted] forKey:@"deleted"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self namespace])
    {
        [result setValue:[self namespace] forKey:@"namespace"];
    }
    if([self namespaceUID])
    {
        [result setValue:[self namespaceUID] forKey:@"namespaceUID"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self noticeTime])
    {
        [result setValue:[self noticeTime] forKey:@"noticeTime"];
    }
    if([self obj])
    {
        [result setValue:[self obj] forKey:@"obj"];
    }
    if([self objUID])
    {
        [result setValue:[self objUID] forKey:@"objUID"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self rootRuleId])
    {
        [result setValue:[self rootRuleId] forKey:@"rootRuleId"];
    }
    if([self ruleId])
    {
        [result setValue:[self ruleId] forKey:@"ruleId"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.contactGroups = [dictionary objectForKey:@"contactGroups"];
    self.contactPersons = [dictionary objectForKey:@"contactPersons"];
    self.deleted = [dictionary objectForKey:@"deleted"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.namespace = [dictionary objectForKey:@"namespace"];
    self.namespaceUID = [dictionary objectForKey:@"namespaceUID"];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.noticeTime = [dictionary objectForKey:@"noticeTime"];
    self.obj = [dictionary objectForKey:@"obj"];
    self.objUID = [dictionary objectForKey:@"objUID"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.rootRuleId = [dictionary objectForKey:@"rootRuleId"];
    self.ruleId = [dictionary objectForKey:@"ruleId"];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.tag = [dictionary objectForKey:@"tag"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation ChartDimension
-(id) initWithDimension:(NSString*) dimension
      dimensionName:(NSString*)dimensionName
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation MetricInfo
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      metricName:(NSString*)metricName
      metricUid:(NSString*)metricUid { 
     self.calculateUnit = calculateUnit;               
     self.metricName = metricName;               
     self.metricUid = metricUid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self metricUid])
    {
        [result setValue:[self metricUid] forKey:@"metricUid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.metricUid = [dictionary objectForKey:@"metricUid"];
    return self;
}
 @end
@implementation MetricDataList
-(id) initWithErrMetricData:(NSString*) errMetricData
      errDetail:(NSString*)errDetail { 
     self.errMetricData = errMetricData;               
     self.errDetail = errDetail;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self errMetricData])
    {
        [result setValue:[self errMetricData] forKey:@"errMetricData"];
    }
    if([self errDetail])
    {
        [result setValue:[self errDetail] forKey:@"errDetail"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.errMetricData = [dictionary objectForKey:@"errMetricData"];
    self.errDetail = [dictionary objectForKey:@"errDetail"];
    return self;
}
 @end
@implementation RuleState
-(id) initWithResourceId:(NSString*) resourceId
      ruleCount:(NSNumber*)ruleCount
      state:(NSNumber*)state { 
     self.resourceId = resourceId;               
     self.ruleCount = ruleCount;               
     self.state = state;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self ruleCount])
    {
        [result setValue:[self ruleCount] forKey:@"ruleCount"];
    }
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.ruleCount = [dictionary objectForKey:@"ruleCount"];
    self.state = [dictionary objectForKey:@"state"];
    return self;
}
 @end
@implementation ResourceItem
-(id) initWithRegion:(NSString*) region
      resourceId:(NSString*)resourceId { 
     self.region = region;               
     self.resourceId = resourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    return self;
}
 @end
@implementation MonitorTagFilter
-(id) initWithKey:(NSString*) key
      values:(NSArray<NSString*>*)values { 
     self.key = key;               
     self.values = values;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.values = [dictionary objectForKey:@"values"];
    return self;
}
 @end
@implementation UpdateWebHookOut
-(id) initWithSuccess:(NSNumber*) success { 
     self.success = success;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.success = [dictionary objectForKey:@"success"];
    return self;
}
 @end
@implementation DataPointX
-(id) initWithMetric:(NSString*) metric
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      timestamp:(NSNumber*)timestamp
      value:(NSObject*)value { 
     self.metric = metric;               
     self.tags = tags;               
     self.timestamp = timestamp;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self timestamp])
    {
        [result setValue:[self timestamp] forKey:@"timestamp"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.metric = [dictionary objectForKey:@"metric"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.timestamp = [dictionary objectForKey:@"timestamp"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation ServiceMetricAggregateItem
-(id) initWithAggregate:(NSString*) aggregate
      name:(NSString*)name { 
     self.aggregate = aggregate;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregate])
    {
        [result setValue:[self aggregate] forKey:@"aggregate"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregate = [dictionary objectForKey:@"aggregate"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation ChartDetail
-(id) initWithChartName:(NSString*) chartName
      chartUnit:(NSString*)chartUnit
      include:(NSArray<NSString*>*)include { 
     self.chartName = chartName;               
     self.chartUnit = chartUnit;               
     self.include = include;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self chartName])
    {
        [result setValue:[self chartName] forKey:@"chartName"];
    }
    if([self chartUnit])
    {
        [result setValue:[self chartUnit] forKey:@"chartUnit"];
    }
    if([self include])
    {
        [result setValue:[self include] forKey:@"include"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.chartName = [dictionary objectForKey:@"chartName"];
    self.chartUnit = [dictionary objectForKey:@"chartUnit"];
    self.include = [dictionary objectForKey:@"include"];
    return self;
}
 @end
@implementation WidgetTagResource
-(id) initWithId:(NSString*) idValue
      key:(NSString*)key
      regionId:(NSString*)regionId
      value:(NSString*)value { 
     self.idValue = idValue;               
     self.key = key;               
     self.regionId = regionId;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self regionId])
    {
        [result setValue:[self regionId] forKey:@"regionId"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.key = [dictionary objectForKey:@"key"];
    self.regionId = [dictionary objectForKey:@"regionId"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation KeyValue
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation UpdateTemplateResponseResultV2
-(id) initWithSuccess:(NSNumber*) success
      templateUuid:(NSString*)templateUuid { 
     self.success = success;               
     self.templateUuid = templateUuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    if([self templateUuid])
    {
        [result setValue:[self templateUuid] forKey:@"templateUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.success = [dictionary objectForKey:@"success"];
    self.templateUuid = [dictionary objectForKey:@"templateUuid"];
    return self;
}
 @end
@implementation DescribedNoticeContacts
-(id) initWithReferenceId:(NSNumber*) referenceId
      referenceType:(NSNumber*)referenceType { 
     self.referenceId = referenceId;               
     self.referenceType = referenceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self referenceId])
    {
        [result setValue:[self referenceId] forKey:@"referenceId"];
    }
    if([self referenceType])
    {
        [result setValue:[self referenceType] forKey:@"referenceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.referenceId = [dictionary objectForKey:@"referenceId"];
    self.referenceType = [dictionary objectForKey:@"referenceType"];
    return self;
}
 @end
@implementation LinkPolicyInfo
-(id) initWithLinkPolicyName:(NSString*) linkPolicyName
      linkPolicyUuid:(NSString*)linkPolicyUuid { 
     self.linkPolicyName = linkPolicyName;               
     self.linkPolicyUuid = linkPolicyUuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self linkPolicyName])
    {
        [result setValue:[self linkPolicyName] forKey:@"linkPolicyName"];
    }
    if([self linkPolicyUuid])
    {
        [result setValue:[self linkPolicyUuid] forKey:@"linkPolicyUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.linkPolicyName = [dictionary objectForKey:@"linkPolicyName"];
    self.linkPolicyUuid = [dictionary objectForKey:@"linkPolicyUuid"];
    return self;
}
 @end
@implementation UpdateDashboardSpec
-(id) initWithDashboardId:(NSString*) dashboardId
      focused:(NSString*)focused
      name:(NSString*)name { 
     self.dashboardId = dashboardId;               
     self.focused = focused;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self focused])
    {
        [result setValue:[self focused] forKey:@"focused"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    self.focused = [dictionary objectForKey:@"focused"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation DataPoint
-(id) initWithTimestamp:(NSNumber*) timestamp
      value:(NSObject*)value { 
     self.timestamp = timestamp;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self timestamp])
    {
        [result setValue:[self timestamp] forKey:@"timestamp"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.timestamp = [dictionary objectForKey:@"timestamp"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Tag
-(id) initWithTagKey:(NSString*) tagKey
      tagValue:(NSString*)tagValue { 
     self.tagKey = tagKey;               
     self.tagValue = tagValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self tagValue])
    {
        [result setValue:[self tagValue] forKey:@"tagValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.tagValue = [dictionary objectForKey:@"tagValue"];
    return self;
}
 @end
@implementation Metric
-(id) initWithAggregator:(NSString*) aggregator
      calculateUnit:(NSString*)calculateUnit
      metricValue:(NSString*)metricValue
      metricName:(NSString*)metricName
      period:(NSString*)period { 
     self.aggregator = aggregator;               
     self.calculateUnit = calculateUnit;               
     self.metricValue = metricValue;               
     self.metricName = metricName;               
     self.period = period;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregator])
    {
        [result setValue:[self aggregator] forKey:@"aggregator"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self metricValue])
    {
        [result setValue:[self metricValue] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregator = [dictionary objectForKey:@"aggregator"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.metricValue = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.period = [dictionary objectForKey:@"period"];
    return self;
}
 @end
@implementation NsInfo
-(id) initWithMetricCount:(NSNumber*) metricCount
      nsName:(NSString*)nsName
      nsUid:(NSString*)nsUid
      objCount:(NSNumber*)objCount { 
     self.metricCount = metricCount;               
     self.nsName = nsName;               
     self.nsUid = nsUid;               
     self.objCount = objCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metricCount])
    {
        [result setValue:[self metricCount] forKey:@"metricCount"];
    }
    if([self nsName])
    {
        [result setValue:[self nsName] forKey:@"nsName"];
    }
    if([self nsUid])
    {
        [result setValue:[self nsUid] forKey:@"nsUid"];
    }
    if([self objCount])
    {
        [result setValue:[self objCount] forKey:@"objCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.metricCount = [dictionary objectForKey:@"metricCount"];
    self.nsName = [dictionary objectForKey:@"nsName"];
    self.nsUid = [dictionary objectForKey:@"nsUid"];
    self.objCount = [dictionary objectForKey:@"objCount"];
    return self;
}
 @end
@implementation WidgetMetric
-(id) initWithAggregate:(NSString*) aggregate
      metric:(NSString*)metric
      metricName:(NSString*)metricName { 
     self.aggregate = aggregate;               
     self.metric = metric;               
     self.metricName = metricName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregate])
    {
        [result setValue:[self aggregate] forKey:@"aggregate"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregate = [dictionary objectForKey:@"aggregate"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    return self;
}
 @end
@implementation WidgetPosition
-(id) initWithCol:(NSNumber*) col
      createdTime:(NSNumber*)createdTime
      order:(NSNumber*)order
      row:(NSNumber*)row
      sizeX:(NSNumber*)sizeX
      sizeY:(NSNumber*)sizeY
      updatedTime:(NSNumber*)updatedTime { 
     self.col = col;               
     self.createdTime = createdTime;               
     self.order = order;               
     self.row = row;               
     self.sizeX = sizeX;               
     self.sizeY = sizeY;               
     self.updatedTime = updatedTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self col])
    {
        [result setValue:[self col] forKey:@"col"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self order])
    {
        [result setValue:[self order] forKey:@"order"];
    }
    if([self row])
    {
        [result setValue:[self row] forKey:@"row"];
    }
    if([self sizeX])
    {
        [result setValue:[self sizeX] forKey:@"sizeX"];
    }
    if([self sizeY])
    {
        [result setValue:[self sizeY] forKey:@"sizeY"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.col = [dictionary objectForKey:@"col"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.order = [dictionary objectForKey:@"order"];
    self.row = [dictionary objectForKey:@"row"];
    self.sizeX = [dictionary objectForKey:@"sizeX"];
    self.sizeY = [dictionary objectForKey:@"sizeY"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
}
 @end
@implementation DescribeTopNSlowSqlSpec
-(id) initWithEndTime:(NSString*) endTime
      resourceId:(NSString*)resourceId
      serviceCode:(NSString*)serviceCode
      startTime:(NSString*)startTime
      timeInterval:(NSString*)timeInterval
      topN:(NSNumber*)topN { 
     self.endTime = endTime;               
     self.resourceId = resourceId;               
     self.serviceCode = serviceCode;               
     self.startTime = startTime;               
     self.timeInterval = timeInterval;               
     self.topN = topN;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    if([self topN])
    {
        [result setValue:[self topN] forKey:@"topN"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    self.topN = [dictionary objectForKey:@"topN"];
    return self;
}
 @end
@implementation BaseContact
-(id) initWithReferenceId:(NSNumber*) referenceId
      referenceType:(NSNumber*)referenceType { 
     self.referenceId = referenceId;               
     self.referenceType = referenceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self referenceId])
    {
        [result setValue:[self referenceId] forKey:@"referenceId"];
    }
    if([self referenceType])
    {
        [result setValue:[self referenceType] forKey:@"referenceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.referenceId = [dictionary objectForKey:@"referenceId"];
    self.referenceType = [dictionary objectForKey:@"referenceType"];
    return self;
}
 @end
@implementation RuleResourceInfo
-(id) initWithDimension:(NSString*) dimension
      product:(NSString*)product
      region:(NSString*)region
      resourceId:(NSString*)resourceId { 
     self.dimension = dimension;               
     self.product = product;               
     self.region = region;               
     self.resourceId = resourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.product = [dictionary objectForKey:@"product"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    return self;
}
 @end
@implementation DescribeCMMetricsDataSpec
-(id) initWithAggrType:(NSString*) aggrType
      endTime:(NSString*)endTime
      metricUID:(NSArray<NSString*>*)metricUID
      startTime:(NSString*)startTime
      timeInterval:(NSString*)timeInterval { 
     self.aggrType = aggrType;               
     self.endTime = endTime;               
     self.metricUID = metricUID;               
     self.startTime = startTime;               
     self.timeInterval = timeInterval;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggrType])
    {
        [result setValue:[self aggrType] forKey:@"aggrType"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self metricUID])
    {
        [result setValue:[self metricUID] forKey:@"metricUID"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggrType = [dictionary objectForKey:@"aggrType"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.metricUID = [dictionary objectForKey:@"metricUID"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    return self;
}
 @end
@implementation WidgetSupportedProduct
-(id) initWithName:(NSString*) name
      serviceCode:(NSString*)serviceCode { 
     self.name = name;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation Chart
-(id) initWithChartName:(NSString*) chartName
      chartUnit:(NSString*)chartUnit
      include:(NSArray<NSString*>*)include { 
     self.chartName = chartName;               
     self.chartUnit = chartUnit;               
     self.include = include;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self chartName])
    {
        [result setValue:[self chartName] forKey:@"chartName"];
    }
    if([self chartUnit])
    {
        [result setValue:[self chartUnit] forKey:@"chartUnit"];
    }
    if([self include])
    {
        [result setValue:[self include] forKey:@"include"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.chartName = [dictionary objectForKey:@"chartName"];
    self.chartUnit = [dictionary objectForKey:@"chartUnit"];
    self.include = [dictionary objectForKey:@"include"];
    return self;
}
 @end
@implementation LastDownsampleRespItem
-(id) initWithMetric:(NSString*) metric
      name:(NSString*)name
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      value:(NSObject*)value { 
     self.metric = metric;               
     self.name = name;               
     self.tags = tags;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.metric = [dictionary objectForKey:@"metric"];
    self.name = [dictionary objectForKey:@"name"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation WebHookOption
-(id) initWithWebHookContent:(NSString*) webHookContent
      webHookProtocol:(NSString*)webHookProtocol
      webHookSecret:(NSString*)webHookSecret
      webHookUrl:(NSString*)webHookUrl { 
     self.webHookContent = webHookContent;               
     self.webHookProtocol = webHookProtocol;               
     self.webHookSecret = webHookSecret;               
     self.webHookUrl = webHookUrl;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self webHookContent])
    {
        [result setValue:[self webHookContent] forKey:@"webHookContent"];
    }
    if([self webHookProtocol])
    {
        [result setValue:[self webHookProtocol] forKey:@"webHookProtocol"];
    }
    if([self webHookSecret])
    {
        [result setValue:[self webHookSecret] forKey:@"webHookSecret"];
    }
    if([self webHookUrl])
    {
        [result setValue:[self webHookUrl] forKey:@"webHookUrl"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.webHookContent = [dictionary objectForKey:@"webHookContent"];
    self.webHookProtocol = [dictionary objectForKey:@"webHookProtocol"];
    self.webHookSecret = [dictionary objectForKey:@"webHookSecret"];
    self.webHookUrl = [dictionary objectForKey:@"webHookUrl"];
    return self;
}
 @end
@implementation NoticeOption
-(id) initWithEffectiveIntervalEnd:(NSString*) effectiveIntervalEnd
      effectiveIntervalStart:(NSString*)effectiveIntervalStart
      noticeCondition:(NSArray<NSNumber*>*)noticeCondition
      noticePeriod:(NSNumber*)noticePeriod
      noticeWay:(NSArray<NSNumber*>*)noticeWay { 
     self.effectiveIntervalEnd = effectiveIntervalEnd;               
     self.effectiveIntervalStart = effectiveIntervalStart;               
     self.noticeCondition = noticeCondition;               
     self.noticePeriod = noticePeriod;               
     self.noticeWay = noticeWay;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self effectiveIntervalEnd])
    {
        [result setValue:[self effectiveIntervalEnd] forKey:@"effectiveIntervalEnd"];
    }
    if([self effectiveIntervalStart])
    {
        [result setValue:[self effectiveIntervalStart] forKey:@"effectiveIntervalStart"];
    }
    if([self noticeCondition])
    {
        [result setValue:[self noticeCondition] forKey:@"noticeCondition"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self noticeWay])
    {
        [result setValue:[self noticeWay] forKey:@"noticeWay"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.effectiveIntervalEnd = [dictionary objectForKey:@"effectiveIntervalEnd"];
    self.effectiveIntervalStart = [dictionary objectForKey:@"effectiveIntervalStart"];
    self.noticeCondition = [dictionary objectForKey:@"noticeCondition"];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.noticeWay = [dictionary objectForKey:@"noticeWay"];
    return self;
}
 @end
@implementation Location
-(id) initWithSloc:(NSString*) sloc
      slocName:(NSString*)slocName { 
     self.sloc = sloc;               
     self.slocName = slocName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self sloc])
    {
        [result setValue:[self sloc] forKey:@"sloc"];
    }
    if([self slocName])
    {
        [result setValue:[self slocName] forKey:@"slocName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.sloc = [dictionary objectForKey:@"sloc"];
    self.slocName = [dictionary objectForKey:@"slocName"];
    return self;
}
 @end
@implementation DataTag
-(id) initWithOperation:(NSNumber*) operation
      tagKey:(NSString*)tagKey
      tagValue:(NSString*)tagValue { 
     self.operation = operation;               
     self.tagKey = tagKey;               
     self.tagValue = tagValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self tagValue])
    {
        [result setValue:[self tagValue] forKey:@"tagValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.operation = [dictionary objectForKey:@"operation"];
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.tagValue = [dictionary objectForKey:@"tagValue"];
    return self;
}
 @end
@implementation CreateTemplateResponseEnd
-(id) initWithSuccess:(NSNumber*) success
      templateId:(NSNumber*)templateId { 
     self.success = success;               
     self.templateId = templateId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.success = [dictionary objectForKey:@"success"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    return self;
}
 @end
@implementation Dimension
-(id) initWithDimensionValue:(NSString*) dimensionValue
      dimensionName:(NSString*)dimensionName
      isNode:(NSNumber*)isNode
      tagServiceCode:(NSString*)tagServiceCode
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.dimensionValue = dimensionValue;               
     self.dimensionName = dimensionName;               
     self.isNode = isNode;               
     self.tagServiceCode = tagServiceCode;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dimensionValue])
    {
        [result setValue:[self dimensionValue] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self isNode])
    {
        [result setValue:[self isNode] forKey:@"isNode"];
    }
    if([self tagServiceCode])
    {
        [result setValue:[self tagServiceCode] forKey:@"tagServiceCode"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.dimensionValue = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.isNode = [dictionary objectForKey:@"isNode"];
    self.tagServiceCode = [dictionary objectForKey:@"tagServiceCode"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation AddTagsSpec
-(id) initWithAppCode:(NSString*) appCode
      groupCode:(NSString*)groupCode
      resourceIds:(NSArray<NSString*>*)resourceIds
      serviceCode:(NSString*)serviceCode
      srcServiceCode:(NSString*)srcServiceCode
      tagK:(NSString*)tagK
      tagV:(NSString*)tagV { 
     self.appCode = appCode;               
     self.groupCode = groupCode;               
     self.resourceIds = resourceIds;               
     self.serviceCode = serviceCode;               
     self.srcServiceCode = srcServiceCode;               
     self.tagK = tagK;               
     self.tagV = tagV;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self groupCode])
    {
        [result setValue:[self groupCode] forKey:@"groupCode"];
    }
    if([self resourceIds])
    {
        [result setValue:[self resourceIds] forKey:@"resourceIds"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self srcServiceCode])
    {
        [result setValue:[self srcServiceCode] forKey:@"srcServiceCode"];
    }
    if([self tagK])
    {
        [result setValue:[self tagK] forKey:@"tagK"];
    }
    if([self tagV])
    {
        [result setValue:[self tagV] forKey:@"tagV"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.groupCode = [dictionary objectForKey:@"groupCode"];
    self.resourceIds = [dictionary objectForKey:@"resourceIds"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.srcServiceCode = [dictionary objectForKey:@"srcServiceCode"];
    self.tagK = [dictionary objectForKey:@"tagK"];
    self.tagV = [dictionary objectForKey:@"tagV"];
    return self;
}
 @end
@implementation HandleTags
-(id) initWithHandleTagCode:(NSNumber*) handleTagCode
      prefixMetric:(NSString*)prefixMetric { 
     self.handleTagCode = handleTagCode;               
     self.prefixMetric = prefixMetric;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self handleTagCode])
    {
        [result setValue:[self handleTagCode] forKey:@"handleTagCode"];
    }
    if([self prefixMetric])
    {
        [result setValue:[self prefixMetric] forKey:@"prefixMetric"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.handleTagCode = [dictionary objectForKey:@"handleTagCode"];
    self.prefixMetric = [dictionary objectForKey:@"prefixMetric"];
    return self;
}
 @end
@implementation Resource
-(id) initWithName:(NSString*) name
      regionId:(NSString*)regionId
      resourceId:(NSString*)resourceId { 
     self.name = name;               
     self.regionId = regionId;               
     self.resourceId = resourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self regionId])
    {
        [result setValue:[self regionId] forKey:@"regionId"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.regionId = [dictionary objectForKey:@"regionId"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    return self;
}
 @end
@implementation EnableAlarmsSpec
-(id) initWithIds:(NSArray<NSString*>*) ids { 
     self.ids = ids;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ids])
    {
        [result setValue:[self ids] forKey:@"ids"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ids = [dictionary objectForKey:@"ids"];
    return self;
}
 @end
@implementation StatisticsProductMetric
-(id) initWithAggregate:(NSString*) aggregate
      calculateUnit:(NSString*)calculateUnit
      metric:(NSString*)metric
      metricShow:(NSString*)metricShow { 
     self.aggregate = aggregate;               
     self.calculateUnit = calculateUnit;               
     self.metric = metric;               
     self.metricShow = metricShow;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregate])
    {
        [result setValue:[self aggregate] forKey:@"aggregate"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricShow])
    {
        [result setValue:[self metricShow] forKey:@"metricShow"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregate = [dictionary objectForKey:@"aggregate"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricShow = [dictionary objectForKey:@"metricShow"];
    return self;
}
 @end
@implementation RuleMetricDetail
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      dimension:(NSString*)dimension
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      product:(NSString*)product
      serviceCode:(NSString*)serviceCode { 
     self.calculateUnit = calculateUnit;               
     self.dimension = dimension;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.product = product;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.product = [dictionary objectForKey:@"product"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation DeleteTemplateResponseEnd
-(id) initWithSuccess:(NSNumber*) success { 
     self.success = success;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.success = [dictionary objectForKey:@"success"];
    return self;
}
 @end
@implementation NoticeReceiver
-(id) initWithEmail:(NSString*) email
      mobile:(NSString*)mobile
      personId:(NSNumber*)personId
      pin:(NSString*)pin
      userName:(NSString*)userName { 
     self.email = email;               
     self.mobile = mobile;               
     self.personId = personId;               
     self.pin = pin;               
     self.userName = userName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self email])
    {
        [result setValue:[self email] forKey:@"email"];
    }
    if([self mobile])
    {
        [result setValue:[self mobile] forKey:@"mobile"];
    }
    if([self personId])
    {
        [result setValue:[self personId] forKey:@"personId"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self userName])
    {
        [result setValue:[self userName] forKey:@"userName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.email = [dictionary objectForKey:@"email"];
    self.mobile = [dictionary objectForKey:@"mobile"];
    self.personId = [dictionary objectForKey:@"personId"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.userName = [dictionary objectForKey:@"userName"];
    return self;
}
 @end
@implementation MetricDetail
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      dimension:(NSString*)dimension
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      serviceCode:(NSString*)serviceCode { 
     self.calculateUnit = calculateUnit;               
     self.dimension = dimension;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation Dashboard
-(id) initWithCreatedTime:(NSNumber*) createdTime
      dashboardId:(NSString*)dashboardId
      focused:(NSString*)focused
      name:(NSString*)name
      pin:(NSString*)pin
      updatedTime:(NSNumber*)updatedTime
      widgetCount:(NSNumber*)widgetCount { 
     self.createdTime = createdTime;               
     self.dashboardId = dashboardId;               
     self.focused = focused;               
     self.name = name;               
     self.pin = pin;               
     self.updatedTime = updatedTime;               
     self.widgetCount = widgetCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self focused])
    {
        [result setValue:[self focused] forKey:@"focused"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self widgetCount])
    {
        [result setValue:[self widgetCount] forKey:@"widgetCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    self.focused = [dictionary objectForKey:@"focused"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    self.widgetCount = [dictionary objectForKey:@"widgetCount"];
    return self;
}
 @end
@implementation CreateDashboardSpec
-(id) initWithName:(NSString*) name { 
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation Err
-(id) initWithCode:(NSNumber*) code
      details:(NSObject*)details
      message:(NSString*)message
      status:(NSString*)status { 
     self.code = code;               
     self.details = details;               
     self.message = message;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self details])
    {
        [result setValue:[self details] forKey:@"details"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.details = [dictionary objectForKey:@"details"];
    self.message = [dictionary objectForKey:@"message"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation ObjInfo
-(id) initWithMetrics:(NSArray<NSString*>*) metrics
      objName:(NSString*)objName
      objUid:(NSString*)objUid { 
     self.metrics = metrics;               
     self.objName = objName;               
     self.objUid = objUid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metrics])
    {
        [result setValue:[self metrics] forKey:@"metrics"];
    }
    if([self objName])
    {
        [result setValue:[self objName] forKey:@"objName"];
    }
    if([self objUid])
    {
        [result setValue:[self objUid] forKey:@"objUid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.metrics = [dictionary objectForKey:@"metrics"];
    self.objName = [dictionary objectForKey:@"objName"];
    self.objUid = [dictionary objectForKey:@"objUid"];
    return self;
}
 @end
@implementation MetricDataCm
-(id) initWithNamespace:(NSString*) namespace
      metric:(NSString*)metric
      dimensions:(NSMutableDictionary<NSString*,NSString*>*)dimensions
      timestamp:(NSNumber*)timestamp
      type:(NSNumber*)type
      values:(NSMutableDictionary<NSString*,NSString*>*)values
      unit:(NSString*)unit { 
     self.namespace = namespace;               
     self.metric = metric;               
     self.dimensions = dimensions;               
     self.timestamp = timestamp;               
     self.type = type;               
     self.values = values;               
     self.unit = unit;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self namespace])
    {
        [result setValue:[self namespace] forKey:@"namespace"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self dimensions])
    {
        [result setValue:[self dimensions] forKey:@"dimensions"];
    }
    if([self timestamp])
    {
        [result setValue:[self timestamp] forKey:@"timestamp"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    if([self unit])
    {
        [result setValue:[self unit] forKey:@"unit"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.namespace = [dictionary objectForKey:@"namespace"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.dimensions = [dictionary objectForKey:@"dimensions"];
    self.timestamp = [dictionary objectForKey:@"timestamp"];
    self.type = [dictionary objectForKey:@"type"];
    self.values = [dictionary objectForKey:@"values"];
    self.unit = [dictionary objectForKey:@"unit"];
    return self;
}
 @end
@implementation SqlInfo
-(id) initWithAppCode:(NSString*) appCode
      client_net_address:(NSString*)client_net_address
      database:(NSString*)database
      execution_time:(NSNumber*)execution_time
      loginname:(NSString*)loginname
      metric:(NSString*)metric
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      serviceCode:(NSString*)serviceCode
      session_id:(NSString*)session_id
      sqlstr:(NSString*)sqlstr
      start_time:(NSString*)start_time
      status:(NSString*)status
      time:(NSNumber*)time
      value:(NSNumber*)value { 
     self.appCode = appCode;               
     self.client_net_address = client_net_address;               
     self.database = database;               
     self.execution_time = execution_time;               
     self.loginname = loginname;               
     self.metric = metric;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.serviceCode = serviceCode;               
     self.session_id = session_id;               
     self.sqlstr = sqlstr;               
     self.start_time = start_time;               
     self.status = status;               
     self.time = time;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self client_net_address])
    {
        [result setValue:[self client_net_address] forKey:@"client_net_address"];
    }
    if([self database])
    {
        [result setValue:[self database] forKey:@"database"];
    }
    if([self execution_time])
    {
        [result setValue:[self execution_time] forKey:@"execution_time"];
    }
    if([self loginname])
    {
        [result setValue:[self loginname] forKey:@"loginname"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self session_id])
    {
        [result setValue:[self session_id] forKey:@"session_id"];
    }
    if([self sqlstr])
    {
        [result setValue:[self sqlstr] forKey:@"sqlstr"];
    }
    if([self start_time])
    {
        [result setValue:[self start_time] forKey:@"start_time"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self time])
    {
        [result setValue:[self time] forKey:@"time"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.client_net_address = [dictionary objectForKey:@"client_net_address"];
    self.database = [dictionary objectForKey:@"database"];
    self.execution_time = [dictionary objectForKey:@"execution_time"];
    self.loginname = [dictionary objectForKey:@"loginname"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.session_id = [dictionary objectForKey:@"session_id"];
    self.sqlstr = [dictionary objectForKey:@"sqlstr"];
    self.start_time = [dictionary objectForKey:@"start_time"];
    self.status = [dictionary objectForKey:@"status"];
    self.time = [dictionary objectForKey:@"time"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation UpdateWebHookSpec
-(id) initWithActive:(NSNumber*) active
      content:(NSString*)content
      protocol:(NSString*)protocol
      secret:(NSString*)secret
      url:(NSString*)url { 
     self.active = active;               
     self.content = content;               
     self.protocol = protocol;               
     self.secret = secret;               
     self.url = url;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self active])
    {
        [result setValue:[self active] forKey:@"active"];
    }
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self url])
    {
        [result setValue:[self url] forKey:@"url"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.active = [dictionary objectForKey:@"active"];
    self.content = [dictionary objectForKey:@"content"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.url = [dictionary objectForKey:@"url"];
    return self;
}
 @end
@implementation SqlDataPoint
-(id) initWithAppCode:(NSString*) appCode
      serviceCode:(NSString*)serviceCode
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      metric:(NSString*)metric
      time:(NSNumber*)time
      value:(NSNumber*)value
      start_time:(NSString*)start_time
      execution_time:(NSNumber*)execution_time
      session_id:(NSString*)session_id
      database:(NSString*)database
      client_net_address:(NSString*)client_net_address
      loginname:(NSString*)loginname
      status:(NSString*)status
      sqlstr:(NSString*)sqlstr { 
     self.appCode = appCode;               
     self.serviceCode = serviceCode;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.metric = metric;               
     self.time = time;               
     self.value = value;               
     self.start_time = start_time;               
     self.execution_time = execution_time;               
     self.session_id = session_id;               
     self.database = database;               
     self.client_net_address = client_net_address;               
     self.loginname = loginname;               
     self.status = status;               
     self.sqlstr = sqlstr;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self time])
    {
        [result setValue:[self time] forKey:@"time"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self start_time])
    {
        [result setValue:[self start_time] forKey:@"start_time"];
    }
    if([self execution_time])
    {
        [result setValue:[self execution_time] forKey:@"execution_time"];
    }
    if([self session_id])
    {
        [result setValue:[self session_id] forKey:@"session_id"];
    }
    if([self database])
    {
        [result setValue:[self database] forKey:@"database"];
    }
    if([self client_net_address])
    {
        [result setValue:[self client_net_address] forKey:@"client_net_address"];
    }
    if([self loginname])
    {
        [result setValue:[self loginname] forKey:@"loginname"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self sqlstr])
    {
        [result setValue:[self sqlstr] forKey:@"sqlstr"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.time = [dictionary objectForKey:@"time"];
    self.value = [dictionary objectForKey:@"value"];
    self.start_time = [dictionary objectForKey:@"start_time"];
    self.execution_time = [dictionary objectForKey:@"execution_time"];
    self.session_id = [dictionary objectForKey:@"session_id"];
    self.database = [dictionary objectForKey:@"database"];
    self.client_net_address = [dictionary objectForKey:@"client_net_address"];
    self.loginname = [dictionary objectForKey:@"loginname"];
    self.status = [dictionary objectForKey:@"status"];
    self.sqlstr = [dictionary objectForKey:@"sqlstr"];
    return self;
}
 @end
@implementation DescribeTemplateByIDSpec
-(id) initWithTemplateType:(NSNumber*) templateType { 
     self.templateType = templateType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self templateType])
    {
        [result setValue:[self templateType] forKey:@"templateType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.templateType = [dictionary objectForKey:@"templateType"];
    return self;
}
 @end
@implementation CreateCmAlarmParam
-(id) initWithCalculation:(NSString*) calculation
      contactGroups:(NSArray<NSString*>*)contactGroups
      contactPersons:(NSArray<NSString*>*)contactPersons
      downSample:(NSString*)downSample
      metricUID:(NSString*)metricUID
      namespaceUID:(NSString*)namespaceUID
      noticePeriod:(NSNumber*)noticePeriod
      objUIDs:(NSArray<NSString*>*)objUIDs
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleName:(NSString*)ruleName
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculation = calculation;               
     self.contactGroups = contactGroups;               
     self.contactPersons = contactPersons;               
     self.downSample = downSample;               
     self.metricUID = metricUID;               
     self.namespaceUID = namespaceUID;               
     self.noticePeriod = noticePeriod;               
     self.objUIDs = objUIDs;               
     self.operation = operation;               
     self.period = period;               
     self.ruleName = ruleName;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self contactGroups])
    {
        [result setValue:[self contactGroups] forKey:@"contactGroups"];
    }
    if([self contactPersons])
    {
        [result setValue:[self contactPersons] forKey:@"contactPersons"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metricUID])
    {
        [result setValue:[self metricUID] forKey:@"metricUID"];
    }
    if([self namespaceUID])
    {
        [result setValue:[self namespaceUID] forKey:@"namespaceUID"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self objUIDs])
    {
        [result setValue:[self objUIDs] forKey:@"objUIDs"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.contactGroups = [dictionary objectForKey:@"contactGroups"];
    self.contactPersons = [dictionary objectForKey:@"contactPersons"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metricUID = [dictionary objectForKey:@"metricUID"];
    self.namespaceUID = [dictionary objectForKey:@"namespaceUID"];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.objUIDs = [dictionary objectForKey:@"objUIDs"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation CmAlarm
-(id) initWithCalculation:(NSString*) calculation
      contactGroups:(NSArray<NSString*>*)contactGroups
      contactPersons:(NSArray<NSString*>*)contactPersons
      createTime:(NSString*)createTime
      enabled:(NSNumber*)enabled
      idValue:(NSString*)idValue
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      namespace:(NSString*)namespace
      namespaceUID:(NSString*)namespaceUID
      noticePeriod:(NSNumber*)noticePeriod
      noticeTime:(NSString*)noticeTime
      obj:(NSString*)obj
      objUID:(NSString*)objUID
      operation:(NSString*)operation
      period:(NSNumber*)period
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      rootRuleId:(NSNumber*)rootRuleId
      ruleId:(NSNumber*)ruleId
      ruleName:(NSString*)ruleName
      serviceCode:(NSString*)serviceCode
      status:(NSNumber*)status
      tag:(NSString*)tag
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times
      value:(NSNumber*)value { 
     self.calculation = calculation;               
     self.contactGroups = contactGroups;               
     self.contactPersons = contactPersons;               
     self.createTime = createTime;               
     self.enabled = enabled;               
     self.idValue = idValue;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.namespace = namespace;               
     self.namespaceUID = namespaceUID;               
     self.noticePeriod = noticePeriod;               
     self.noticeTime = noticeTime;               
     self.obj = obj;               
     self.objUID = objUID;               
     self.operation = operation;               
     self.period = period;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.rootRuleId = rootRuleId;               
     self.ruleId = ruleId;               
     self.ruleName = ruleName;               
     self.serviceCode = serviceCode;               
     self.status = status;               
     self.tag = tag;               
     self.threshold = threshold;               
     self.times = times;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self contactGroups])
    {
        [result setValue:[self contactGroups] forKey:@"contactGroups"];
    }
    if([self contactPersons])
    {
        [result setValue:[self contactPersons] forKey:@"contactPersons"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self namespace])
    {
        [result setValue:[self namespace] forKey:@"namespace"];
    }
    if([self namespaceUID])
    {
        [result setValue:[self namespaceUID] forKey:@"namespaceUID"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self noticeTime])
    {
        [result setValue:[self noticeTime] forKey:@"noticeTime"];
    }
    if([self obj])
    {
        [result setValue:[self obj] forKey:@"obj"];
    }
    if([self objUID])
    {
        [result setValue:[self objUID] forKey:@"objUID"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self rootRuleId])
    {
        [result setValue:[self rootRuleId] forKey:@"rootRuleId"];
    }
    if([self ruleId])
    {
        [result setValue:[self ruleId] forKey:@"ruleId"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.contactGroups = [dictionary objectForKey:@"contactGroups"];
    self.contactPersons = [dictionary objectForKey:@"contactPersons"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.namespace = [dictionary objectForKey:@"namespace"];
    self.namespaceUID = [dictionary objectForKey:@"namespaceUID"];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.noticeTime = [dictionary objectForKey:@"noticeTime"];
    self.obj = [dictionary objectForKey:@"obj"];
    self.objUID = [dictionary objectForKey:@"objUID"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.rootRuleId = [dictionary objectForKey:@"rootRuleId"];
    self.ruleId = [dictionary objectForKey:@"ruleId"];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.status = [dictionary objectForKey:@"status"];
    self.tag = [dictionary objectForKey:@"tag"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation UpdateWebHookReq
-(id) initWithActive:(NSNumber*) active
      content:(NSString*)content
      protocol:(NSString*)protocol
      secret:(NSString*)secret
      url:(NSString*)url { 
     self.active = active;               
     self.content = content;               
     self.protocol = protocol;               
     self.secret = secret;               
     self.url = url;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self active])
    {
        [result setValue:[self active] forKey:@"active"];
    }
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self url])
    {
        [result setValue:[self url] forKey:@"url"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.active = [dictionary objectForKey:@"active"];
    self.content = [dictionary objectForKey:@"content"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.url = [dictionary objectForKey:@"url"];
    return self;
}
 @end
@implementation UpdateCmAlarmSpec
-(id) initWithCalculation:(NSString*) calculation
      contactGroups:(NSArray<NSString*>*)contactGroups
      contactPersons:(NSArray<NSString*>*)contactPersons
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleName:(NSString*)ruleName
      serviceCode:(NSString*)serviceCode
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculation = calculation;               
     self.contactGroups = contactGroups;               
     self.contactPersons = contactPersons;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.ruleName = ruleName;               
     self.serviceCode = serviceCode;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self contactGroups])
    {
        [result setValue:[self contactGroups] forKey:@"contactGroups"];
    }
    if([self contactPersons])
    {
        [result setValue:[self contactPersons] forKey:@"contactPersons"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.contactGroups = [dictionary objectForKey:@"contactGroups"];
    self.contactPersons = [dictionary objectForKey:@"contactPersons"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation BatchUpdateWidgetError
-(id) initWithDashboardId:(NSString*) dashboardId
      error:(NSString*)error
      widgetId:(NSString*)widgetId { 
     self.dashboardId = dashboardId;               
     self.error = error;               
     self.widgetId = widgetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self error])
    {
        [result setValue:[self error] forKey:@"error"];
    }
    if([self widgetId])
    {
        [result setValue:[self widgetId] forKey:@"widgetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    self.error = [dictionary objectForKey:@"error"];
    self.widgetId = [dictionary objectForKey:@"widgetId"];
    return self;
}
 @end
@implementation DeleteAlarmsSpec
-(id) initWithFilters:(NSArray<MonitorFilter*>*) filters { 
     self.filters = filters;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self filters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self filters] count]; i++) {
            MonitorFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
            MonitorFilter* item = [[MonitorFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
}
 @end
@implementation BasicRule
-(id) initWithCalculation:(NSString*) calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      noticeLevel:(NoticeLevel*)noticeLevel
      operation:(NSString*)operation
      period:(NSNumber*)period
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.noticeLevel = noticeLevel;               
     self.operation = operation;               
     self.period = period;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation TagsOption
-(id) initWithOperator:(NSString*) operatorValue
      tags:(NSArray<MonitorTagFilter*>*)tags { 
     self.operatorValue = operatorValue;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self operatorValue])
    {
        [result setValue:[self operatorValue] forKey:@"operator"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            MonitorTagFilter* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.operatorValue = [dictionary objectForKey:@"operator"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            MonitorTagFilter* item = [[MonitorTagFilter alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation BasicRuleDetail
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      operation:(NSString*)operation
      period:(NSNumber*)period
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.operation = operation;               
     self.period = period;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation BaseRuleT
-(id) initWithAutoScalingPolicyId:(NSString*) autoScalingPolicyId
      calculateUnit:(NSString*)calculateUnit
      calculation:(NSString*)calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      metricId:(NSNumber*)metricId
      noticeLevel:(NoticeLevel*)noticeLevel
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleType:(NSNumber*)ruleType
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.autoScalingPolicyId = autoScalingPolicyId;               
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.metricId = metricId;               
     self.noticeLevel = noticeLevel;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.ruleType = ruleType;               
     self.tags = tags;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self autoScalingPolicyId])
    {
        [result setValue:[self autoScalingPolicyId] forKey:@"autoScalingPolicyId"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricId])
    {
        [result setValue:[self metricId] forKey:@"metricId"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.autoScalingPolicyId = [dictionary objectForKey:@"autoScalingPolicyId"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricId = [dictionary objectForKey:@"metricId"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation PutBody
-(id) initWithAppCode:(NSString*) appCode
      serviceCode:(NSString*)serviceCode
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      dataPoints:(NSArray<DataPointX*>*)dataPoints { 
     self.appCode = appCode;               
     self.serviceCode = serviceCode;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.dataPoints = dataPoints;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self dataPoints])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self dataPoints] count]; i++) {
            DataPointX* item = [[self dataPoints] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataPoints"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    NSArray* dataPointsArray = [dictionary objectForKey:@"dataPoints"];
    if(dataPointsArray&&![dataPointsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataPointsArray count];i++)
        {
            DataPointX* item = [[DataPointX alloc]initWithDic:[dataPointsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.dataPoints = propertyArray;
    }
    return self;
}
 @end
@implementation ServiceMetricItem
-(id) initWithAggregates:(NSArray<ServiceMetricAggregateItem*>*) aggregates
      calculateUnit:(NSString*)calculateUnit
      metric:(NSString*)metric
      name:(NSString*)name
      serviceCode:(NSString*)serviceCode { 
     self.aggregates = aggregates;               
     self.calculateUnit = calculateUnit;               
     self.metric = metric;               
     self.name = name;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregates])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self aggregates] count]; i++) {
            ServiceMetricAggregateItem* item = [[self aggregates] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"aggregates"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* aggregatesArray = [dictionary objectForKey:@"aggregates"];
    if(aggregatesArray&&![aggregatesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [aggregatesArray count];i++)
        {
            ServiceMetricAggregateItem* item = [[ServiceMetricAggregateItem alloc]initWithDic:[aggregatesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.aggregates = propertyArray;
    }
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.name = [dictionary objectForKey:@"name"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation ServiceMetric
-(id) initWithMetric:(NSArray<ServiceMetricItem*>*) metric
      serviceCode:(NSString*)serviceCode { 
     self.metric = metric;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metric])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metric] count]; i++) {
            ServiceMetricItem* item = [[self metric] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metric"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* metricArray = [dictionary objectForKey:@"metric"];
    if(metricArray&&![metricArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricArray count];i++)
        {
            ServiceMetricItem* item = [[ServiceMetricItem alloc]initWithDic:[metricArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metric = propertyArray;
    }
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation GetWidgetMetricOut
-(id) initWithList:(NSArray<ServiceMetric*>*) list { 
     self.list = list;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self list] count]; i++) {
            ServiceMetric* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
            ServiceMetric* item = [[ServiceMetric alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    return self;
}
 @end
@implementation GroupNode
-(id) initWithChilds:(NSArray<GroupNode*>*) childs
      groupCode:(NSString*)groupCode
      parent:(NSString*)parent { 
     self.childs = childs;               
     self.groupCode = groupCode;               
     self.parent = parent;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self childs])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self childs] count]; i++) {
            GroupNode* item = [[self childs] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"childs"];
    }
    if([self groupCode])
    {
        [result setValue:[self groupCode] forKey:@"groupCode"];
    }
    if([self parent])
    {
        [result setValue:[self parent] forKey:@"parent"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* childsArray = [dictionary objectForKey:@"childs"];
    if(childsArray&&![childsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [childsArray count];i++)
        {
            GroupNode* item = [[GroupNode alloc]initWithDic:[childsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.childs = propertyArray;
    }
    self.groupCode = [dictionary objectForKey:@"groupCode"];
    self.parent = [dictionary objectForKey:@"parent"];
    return self;
}
 @end
@implementation WidgetResources
-(id) initWithRaw:(NSArray<WidgetRawResource*>*) raw
      tag:(NSArray<WidgetTagResource*>*)tag { 
     self.raw = raw;               
     self.tag = tag;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self raw])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self raw] count]; i++) {
            WidgetRawResource* item = [[self raw] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"raw"];
    }
    if([self tag])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tag] count]; i++) {
            WidgetTagResource* item = [[self tag] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tag"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* rawArray = [dictionary objectForKey:@"raw"];
    if(rawArray&&![rawArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [rawArray count];i++)
        {
            WidgetRawResource* item = [[WidgetRawResource alloc]initWithDic:[rawArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.raw = propertyArray;
    }
    NSArray* tagArray = [dictionary objectForKey:@"tag"];
    if(tagArray&&![tagArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagArray count];i++)
        {
            WidgetTagResource* item = [[WidgetTagResource alloc]initWithDic:[tagArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tag = propertyArray;
    }
    return self;
}
 @end
@implementation TemplateRulesVo
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      createTime:(NSString*)createTime
      deleted:(NSNumber*)deleted
      downSample:(NSString*)downSample
      idValue:(NSNumber*)idValue
      metric:(NSString*)metric
      metricId:(NSNumber*)metricId
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleType:(NSNumber*)ruleType
      serviceCode:(NSString*)serviceCode
      tag:(NSString*)tag
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times
      updateTime:(NSString*)updateTime
      uuid:(NSString*)uuid { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.createTime = createTime;               
     self.deleted = deleted;               
     self.downSample = downSample;               
     self.idValue = idValue;               
     self.metric = metric;               
     self.metricId = metricId;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.ruleType = ruleType;               
     self.serviceCode = serviceCode;               
     self.tag = tag;               
     self.tags = tags;               
     self.threshold = threshold;               
     self.times = times;               
     self.updateTime = updateTime;               
     self.uuid = uuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self deleted])
    {
        [result setValue:[self deleted] forKey:@"deleted"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricId])
    {
        [result setValue:[self metricId] forKey:@"metricId"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.deleted = [dictionary objectForKey:@"deleted"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricId = [dictionary objectForKey:@"metricId"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.tag = [dictionary objectForKey:@"tag"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
}
 @end
@implementation RuleDetail
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      operation:(NSString*)operation
      period:(NSNumber*)period
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.operation = operation;               
     self.period = period;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation GroupTree
-(id) initWithChilds:(NSArray<GroupNode*>*) childs
      serviceCode:(NSString*)serviceCode { 
     self.childs = childs;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self childs])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self childs] count]; i++) {
            GroupNode* item = [[self childs] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"childs"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* childsArray = [dictionary objectForKey:@"childs"];
    if(childsArray&&![childsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [childsArray count];i++)
        {
            GroupNode* item = [[GroupNode alloc]initWithDic:[childsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.childs = propertyArray;
    }
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation MetricData
-(id) initWithData:(NSArray<DataPoint*>*) data
      metric:(Metric*)metric
      tags:(NSArray<Tag*>*)tags { 
     self.data = data;               
     self.metric = metric;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self data] count]; i++) {
            DataPoint* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    if([self metric])
    {
        [result setValue:[[self metric] dictionary]forKey:@"metric"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
            DataPoint* item = [[DataPoint alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    self.metric = [[Metric alloc]initWithDic:[dictionary objectForKey:@"metric"]];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation Widget
-(id) initWithAggregated:(NSString*) aggregated
      createdTime:(NSNumber*)createdTime
      dashboardId:(NSString*)dashboardId
      metrics:(NSArray<WidgetMetric*>*)metrics
      name:(NSString*)name
      position:(WidgetPosition*)position
      resources:(WidgetResources*)resources
      serviceCode:(NSString*)serviceCode
      topN:(NSNumber*)topN
      type:(NSString*)type
      updatedTime:(NSNumber*)updatedTime
      widgetId:(NSString*)widgetId { 
     self.aggregated = aggregated;               
     self.createdTime = createdTime;               
     self.dashboardId = dashboardId;               
     self.metrics = metrics;               
     self.name = name;               
     self.position = position;               
     self.resources = resources;               
     self.serviceCode = serviceCode;               
     self.topN = topN;               
     self.type = type;               
     self.updatedTime = updatedTime;               
     self.widgetId = widgetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregated])
    {
        [result setValue:[self aggregated] forKey:@"aggregated"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self metrics])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metrics] count]; i++) {
            WidgetMetric* item = [[self metrics] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metrics"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self position])
    {
        [result setValue:[[self position] dictionary]forKey:@"position"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self topN])
    {
        [result setValue:[self topN] forKey:@"topN"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self widgetId])
    {
        [result setValue:[self widgetId] forKey:@"widgetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregated = [dictionary objectForKey:@"aggregated"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    NSArray* metricsArray = [dictionary objectForKey:@"metrics"];
    if(metricsArray&&![metricsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricsArray count];i++)
        {
            WidgetMetric* item = [[WidgetMetric alloc]initWithDic:[metricsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metrics = propertyArray;
    }
    self.name = [dictionary objectForKey:@"name"];
    self.position = [[WidgetPosition alloc]initWithDic:[dictionary objectForKey:@"position"]];
    self.resources = [[WidgetResources alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.topN = [dictionary objectForKey:@"topN"];
    self.type = [dictionary objectForKey:@"type"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    self.widgetId = [dictionary objectForKey:@"widgetId"];
    return self;
}
 @end
@implementation AlarmVo
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      contacts:(NSArray<BaseContact*>*)contacts
      createTime:(NSString*)createTime
      deleted:(NSNumber*)deleted
      downSample:(NSString*)downSample
      idValue:(NSNumber*)idValue
      metric:(NSString*)metric
      metricId:(NSNumber*)metricId
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleType:(NSNumber*)ruleType
      serviceCode:(NSString*)serviceCode
      tag:(NSString*)tag
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times
      updateTime:(NSString*)updateTime { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.contacts = contacts;               
     self.createTime = createTime;               
     self.deleted = deleted;               
     self.downSample = downSample;               
     self.idValue = idValue;               
     self.metric = metric;               
     self.metricId = metricId;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.ruleType = ruleType;               
     self.serviceCode = serviceCode;               
     self.tag = tag;               
     self.tags = tags;               
     self.threshold = threshold;               
     self.times = times;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self contacts])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self contacts] count]; i++) {
            BaseContact* item = [[self contacts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"contacts"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self deleted])
    {
        [result setValue:[self deleted] forKey:@"deleted"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricId])
    {
        [result setValue:[self metricId] forKey:@"metricId"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    NSArray* contactsArray = [dictionary objectForKey:@"contacts"];
    if(contactsArray&&![contactsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [contactsArray count];i++)
        {
            BaseContact* item = [[BaseContact alloc]initWithDic:[contactsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.contacts = propertyArray;
    }
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.deleted = [dictionary objectForKey:@"deleted"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricId = [dictionary objectForKey:@"metricId"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.tag = [dictionary objectForKey:@"tag"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation GetWidgetDataPointsSpec
-(id) initWithAggregated:(NSString*) aggregated
      createdTime:(NSNumber*)createdTime
      dashboardId:(NSString*)dashboardId
      endTime:(NSString*)endTime
      filters:(NSArray<MonitorFilter*>*)filters
      metrics:(NSArray<WidgetMetric*>*)metrics
      name:(NSString*)name
      position:(WidgetPosition*)position
      resources:(WidgetResources*)resources
      serviceCode:(NSString*)serviceCode
      startTime:(NSString*)startTime
      topN:(NSNumber*)topN
      type:(NSString*)type
      updatedTime:(NSNumber*)updatedTime
      widgetId:(NSArray<NSString*>*)widgetId { 
     self.aggregated = aggregated;               
     self.createdTime = createdTime;               
     self.dashboardId = dashboardId;               
     self.endTime = endTime;               
     self.filters = filters;               
     self.metrics = metrics;               
     self.name = name;               
     self.position = position;               
     self.resources = resources;               
     self.serviceCode = serviceCode;               
     self.startTime = startTime;               
     self.topN = topN;               
     self.type = type;               
     self.updatedTime = updatedTime;               
     self.widgetId = widgetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregated])
    {
        [result setValue:[self aggregated] forKey:@"aggregated"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self filters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self filters] count]; i++) {
            MonitorFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self metrics])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metrics] count]; i++) {
            WidgetMetric* item = [[self metrics] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metrics"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self position])
    {
        [result setValue:[[self position] dictionary]forKey:@"position"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self topN])
    {
        [result setValue:[self topN] forKey:@"topN"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self widgetId])
    {
        [result setValue:[self widgetId] forKey:@"widgetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregated = [dictionary objectForKey:@"aggregated"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
            MonitorFilter* item = [[MonitorFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    NSArray* metricsArray = [dictionary objectForKey:@"metrics"];
    if(metricsArray&&![metricsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricsArray count];i++)
        {
            WidgetMetric* item = [[WidgetMetric alloc]initWithDic:[metricsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metrics = propertyArray;
    }
    self.name = [dictionary objectForKey:@"name"];
    self.position = [[WidgetPosition alloc]initWithDic:[dictionary objectForKey:@"position"]];
    self.resources = [[WidgetResources alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.topN = [dictionary objectForKey:@"topN"];
    self.type = [dictionary objectForKey:@"type"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    self.widgetId = [dictionary objectForKey:@"widgetId"];
    return self;
}
 @end
@implementation CreateWidgetSpec
-(id) initWithAggregated:(NSString*) aggregated
      createdTime:(NSNumber*)createdTime
      dashboardId:(NSString*)dashboardId
      metrics:(NSArray<WidgetMetric*>*)metrics
      name:(NSString*)name
      position:(WidgetPosition*)position
      resources:(WidgetResources*)resources
      serviceCode:(NSString*)serviceCode
      topN:(NSNumber*)topN
      type:(NSString*)type
      updatedTime:(NSNumber*)updatedTime
      widgetId:(NSString*)widgetId { 
     self.aggregated = aggregated;               
     self.createdTime = createdTime;               
     self.dashboardId = dashboardId;               
     self.metrics = metrics;               
     self.name = name;               
     self.position = position;               
     self.resources = resources;               
     self.serviceCode = serviceCode;               
     self.topN = topN;               
     self.type = type;               
     self.updatedTime = updatedTime;               
     self.widgetId = widgetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregated])
    {
        [result setValue:[self aggregated] forKey:@"aggregated"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self metrics])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metrics] count]; i++) {
            WidgetMetric* item = [[self metrics] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metrics"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self position])
    {
        [result setValue:[[self position] dictionary]forKey:@"position"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self topN])
    {
        [result setValue:[self topN] forKey:@"topN"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self widgetId])
    {
        [result setValue:[self widgetId] forKey:@"widgetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregated = [dictionary objectForKey:@"aggregated"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    NSArray* metricsArray = [dictionary objectForKey:@"metrics"];
    if(metricsArray&&![metricsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricsArray count];i++)
        {
            WidgetMetric* item = [[WidgetMetric alloc]initWithDic:[metricsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metrics = propertyArray;
    }
    self.name = [dictionary objectForKey:@"name"];
    self.position = [[WidgetPosition alloc]initWithDic:[dictionary objectForKey:@"position"]];
    self.resources = [[WidgetResources alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.topN = [dictionary objectForKey:@"topN"];
    self.type = [dictionary objectForKey:@"type"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    self.widgetId = [dictionary objectForKey:@"widgetId"];
    return self;
}
 @end
@implementation CreateTemplateRequestV2
-(id) initWithClientToken:(NSString*) clientToken
      descriptionValue:(NSString*)descriptionValue
      dimension:(NSString*)dimension
      product:(NSString*)product
      templateName:(NSString*)templateName
      templateRules:(NSArray<BasicRule*>*)templateRules { 
     self.clientToken = clientToken;               
     self.descriptionValue = descriptionValue;               
     self.dimension = dimension;               
     self.product = product;               
     self.templateName = templateName;               
     self.templateRules = templateRules;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    if([self templateRules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateRules] count]; i++) {
            BasicRule* item = [[self templateRules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateRules"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.product = [dictionary objectForKey:@"product"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    NSArray* templateRulesArray = [dictionary objectForKey:@"templateRules"];
    if(templateRulesArray&&![templateRulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateRulesArray count];i++)
        {
            BasicRule* item = [[BasicRule alloc]initWithDic:[templateRulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateRules = propertyArray;
    }
    return self;
}
 @end
@implementation TemplateVo
-(id) initWithCreateTime:(NSString*) createTime
      descriptionValue:(NSString*)descriptionValue
      pin:(NSString*)pin
      rulesCount:(NSNumber*)rulesCount
      serviceCode:(NSString*)serviceCode
      templateId:(NSNumber*)templateId
      templateName:(NSString*)templateName
      templateRules:(NSArray<AlarmVo*>*)templateRules
      templateRulesString:(NSArray<NSString*>*)templateRulesString
      templateType:(NSNumber*)templateType
      updateTime:(NSString*)updateTime { 
     self.createTime = createTime;               
     self.descriptionValue = descriptionValue;               
     self.pin = pin;               
     self.rulesCount = rulesCount;               
     self.serviceCode = serviceCode;               
     self.templateId = templateId;               
     self.templateName = templateName;               
     self.templateRules = templateRules;               
     self.templateRulesString = templateRulesString;               
     self.templateType = templateType;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self rulesCount])
    {
        [result setValue:[self rulesCount] forKey:@"rulesCount"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    if([self templateRules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateRules] count]; i++) {
            AlarmVo* item = [[self templateRules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateRules"];
    }
    if([self templateRulesString])
    {
        [result setValue:[self templateRulesString] forKey:@"templateRulesString"];
    }
    if([self templateType])
    {
        [result setValue:[self templateType] forKey:@"templateType"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.rulesCount = [dictionary objectForKey:@"rulesCount"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    NSArray* templateRulesArray = [dictionary objectForKey:@"templateRules"];
    if(templateRulesArray&&![templateRulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateRulesArray count];i++)
        {
            AlarmVo* item = [[AlarmVo alloc]initWithDic:[templateRulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateRules = propertyArray;
    }
    self.templateRulesString = [dictionary objectForKey:@"templateRulesString"];
    self.templateType = [dictionary objectForKey:@"templateType"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation DescribedAlarm
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      createTime:(NSString*)createTime
      downSample:(NSString*)downSample
      enabled:(NSNumber*)enabled
      idValue:(NSString*)idValue
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      ruleName:(NSString*)ruleName
      serviceCode:(NSString*)serviceCode
      status:(NSNumber*)status
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times
      webHookContent:(NSString*)webHookContent
      webHookProtocol:(NSString*)webHookProtocol
      webHookSecret:(NSString*)webHookSecret
      webHookUrl:(NSString*)webHookUrl { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.createTime = createTime;               
     self.downSample = downSample;               
     self.enabled = enabled;               
     self.idValue = idValue;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.ruleName = ruleName;               
     self.serviceCode = serviceCode;               
     self.status = status;               
     self.tags = tags;               
     self.threshold = threshold;               
     self.times = times;               
     self.webHookContent = webHookContent;               
     self.webHookProtocol = webHookProtocol;               
     self.webHookSecret = webHookSecret;               
     self.webHookUrl = webHookUrl;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    if([self webHookContent])
    {
        [result setValue:[self webHookContent] forKey:@"webHookContent"];
    }
    if([self webHookProtocol])
    {
        [result setValue:[self webHookProtocol] forKey:@"webHookProtocol"];
    }
    if([self webHookSecret])
    {
        [result setValue:[self webHookSecret] forKey:@"webHookSecret"];
    }
    if([self webHookUrl])
    {
        [result setValue:[self webHookUrl] forKey:@"webHookUrl"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.status = [dictionary objectForKey:@"status"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    self.webHookContent = [dictionary objectForKey:@"webHookContent"];
    self.webHookProtocol = [dictionary objectForKey:@"webHookProtocol"];
    self.webHookSecret = [dictionary objectForKey:@"webHookSecret"];
    self.webHookUrl = [dictionary objectForKey:@"webHookUrl"];
    return self;
}
 @end
@implementation RuleOption
-(id) initWithRules:(NSArray<BasicRule*>*) rules
      templateOption:(TemplateOption*)templateOption { 
     self.rules = rules;               
     self.templateOption = templateOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self rules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self rules] count]; i++) {
            BasicRule* item = [[self rules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"rules"];
    }
    if([self templateOption])
    {
        [result setValue:[[self templateOption] dictionary]forKey:@"templateOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* rulesArray = [dictionary objectForKey:@"rules"];
    if(rulesArray&&![rulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [rulesArray count];i++)
        {
            BasicRule* item = [[BasicRule alloc]initWithDic:[rulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.rules = propertyArray;
    }
    self.templateOption = [[TemplateOption alloc]initWithDic:[dictionary objectForKey:@"templateOption"]];
    return self;
}
 @end
@implementation GroupInfo
-(id) initWithCharts:(NSArray<Chart*>*) charts
      groupCode:(NSString*)groupCode
      groupName:(NSString*)groupName
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      webCode:(NSString*)webCode { 
     self.charts = charts;               
     self.groupCode = groupCode;               
     self.groupName = groupName;               
     self.tags = tags;               
     self.webCode = webCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self charts])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self charts] count]; i++) {
            Chart* item = [[self charts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"charts"];
    }
    if([self groupCode])
    {
        [result setValue:[self groupCode] forKey:@"groupCode"];
    }
    if([self groupName])
    {
        [result setValue:[self groupName] forKey:@"groupName"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self webCode])
    {
        [result setValue:[self webCode] forKey:@"webCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* chartsArray = [dictionary objectForKey:@"charts"];
    if(chartsArray&&![chartsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [chartsArray count];i++)
        {
            Chart* item = [[Chart alloc]initWithDic:[chartsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.charts = propertyArray;
    }
    self.groupCode = [dictionary objectForKey:@"groupCode"];
    self.groupName = [dictionary objectForKey:@"groupName"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.webCode = [dictionary objectForKey:@"webCode"];
    return self;
}
 @end
@implementation ServiceInfo
-(id) initWithGroupTree:(GroupTree*) groupTree
      metricGroup:(NSArray<GroupInfo*>*)metricGroup
      metricsTimeDelay:(NSNumber*)metricsTimeDelay
      serviceCode:(NSString*)serviceCode
      serviceName:(NSString*)serviceName
      timeInterval:(NSNumber*)timeInterval { 
     self.groupTree = groupTree;               
     self.metricGroup = metricGroup;               
     self.metricsTimeDelay = metricsTimeDelay;               
     self.serviceCode = serviceCode;               
     self.serviceName = serviceName;               
     self.timeInterval = timeInterval;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self groupTree])
    {
        [result setValue:[[self groupTree] dictionary]forKey:@"groupTree"];
    }
    if([self metricGroup])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metricGroup] count]; i++) {
            GroupInfo* item = [[self metricGroup] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metricGroup"];
    }
    if([self metricsTimeDelay])
    {
        [result setValue:[self metricsTimeDelay] forKey:@"metricsTimeDelay"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self serviceName])
    {
        [result setValue:[self serviceName] forKey:@"serviceName"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.groupTree = [[GroupTree alloc]initWithDic:[dictionary objectForKey:@"groupTree"]];
    NSArray* metricGroupArray = [dictionary objectForKey:@"metricGroup"];
    if(metricGroupArray&&![metricGroupArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricGroupArray count];i++)
        {
            GroupInfo* item = [[GroupInfo alloc]initWithDic:[metricGroupArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metricGroup = propertyArray;
    }
    self.metricsTimeDelay = [dictionary objectForKey:@"metricsTimeDelay"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.serviceName = [dictionary objectForKey:@"serviceName"];
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    return self;
}
 @end
@implementation DescribeTemplatesResponseEnd
-(id) initWithNumberPages:(NSNumber*) numberPages
      numberRecords:(NSNumber*)numberRecords
      pageNumber:(NSNumber*)pageNumber
      pageSize:(NSNumber*)pageSize
      templateCount:(NSNumber*)templateCount
      templateList:(NSArray<TemplateVo*>*)templateList { 
     self.numberPages = numberPages;               
     self.numberRecords = numberRecords;               
     self.pageNumber = pageNumber;               
     self.pageSize = pageSize;               
     self.templateCount = templateCount;               
     self.templateList = templateList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self numberPages])
    {
        [result setValue:[self numberPages] forKey:@"numberPages"];
    }
    if([self numberRecords])
    {
        [result setValue:[self numberRecords] forKey:@"numberRecords"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self templateCount])
    {
        [result setValue:[self templateCount] forKey:@"templateCount"];
    }
    if([self templateList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateList] count]; i++) {
            TemplateVo* item = [[self templateList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.numberPages = [dictionary objectForKey:@"numberPages"];
    self.numberRecords = [dictionary objectForKey:@"numberRecords"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.templateCount = [dictionary objectForKey:@"templateCount"];
    NSArray* templateListArray = [dictionary objectForKey:@"templateList"];
    if(templateListArray&&![templateListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateListArray count];i++)
        {
            TemplateVo* item = [[TemplateVo alloc]initWithDic:[templateListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateList = propertyArray;
    }
    return self;
}
 @end
@implementation ServiceInfoV2
-(id) initWithDimensions:(NSArray<ChartDimension*>*) dimensions
      groupTree:(GroupTree*)groupTree
      serviceCode:(NSString*)serviceCode
      serviceName:(NSString*)serviceName { 
     self.dimensions = dimensions;               
     self.groupTree = groupTree;               
     self.serviceCode = serviceCode;               
     self.serviceName = serviceName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dimensions])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self dimensions] count]; i++) {
            ChartDimension* item = [[self dimensions] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dimensions"];
    }
    if([self groupTree])
    {
        [result setValue:[[self groupTree] dictionary]forKey:@"groupTree"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self serviceName])
    {
        [result setValue:[self serviceName] forKey:@"serviceName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dimensionsArray = [dictionary objectForKey:@"dimensions"];
    if(dimensionsArray&&![dimensionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dimensionsArray count];i++)
        {
            ChartDimension* item = [[ChartDimension alloc]initWithDic:[dimensionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.dimensions = propertyArray;
    }
    self.groupTree = [[GroupTree alloc]initWithDic:[dictionary objectForKey:@"groupTree"]];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.serviceName = [dictionary objectForKey:@"serviceName"];
    return self;
}
 @end
@implementation MaintainAuxiliaryTags
-(id) initWithAppCode:(NSString*) appCode
      filter:(NSArray<DataTag*>*)filter
      groupCode:(NSString*)groupCode
      resourceIds:(NSArray<NSString*>*)resourceIds
      serviceCode:(NSString*)serviceCode
      srcServiceCode:(NSString*)srcServiceCode
      tags:(HandleTags*)tags { 
     self.appCode = appCode;               
     self.filter = filter;               
     self.groupCode = groupCode;               
     self.resourceIds = resourceIds;               
     self.serviceCode = serviceCode;               
     self.srcServiceCode = srcServiceCode;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self filter])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self filter] count]; i++) {
            DataTag* item = [[self filter] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filter"];
    }
    if([self groupCode])
    {
        [result setValue:[self groupCode] forKey:@"groupCode"];
    }
    if([self resourceIds])
    {
        [result setValue:[self resourceIds] forKey:@"resourceIds"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self srcServiceCode])
    {
        [result setValue:[self srcServiceCode] forKey:@"srcServiceCode"];
    }
    if([self tags])
    {
        [result setValue:[[self tags] dictionary]forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    NSArray* filterArray = [dictionary objectForKey:@"filter"];
    if(filterArray&&![filterArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filterArray count];i++)
        {
            DataTag* item = [[DataTag alloc]initWithDic:[filterArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.filter = propertyArray;
    }
    self.groupCode = [dictionary objectForKey:@"groupCode"];
    self.resourceIds = [dictionary objectForKey:@"resourceIds"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.srcServiceCode = [dictionary objectForKey:@"srcServiceCode"];
    self.tags = [[HandleTags alloc]initWithDic:[dictionary objectForKey:@"tags"]];
    return self;
}
 @end
@implementation CreateAlarmSpec
-(id) initWithBaseContact:(NSArray<BaseContact*>*) baseContact
      clientToken:(NSString*)clientToken
      dimension:(NSString*)dimension
      enabled:(NSNumber*)enabled
      noticeOption:(NSArray<NoticeOption*>*)noticeOption
      product:(NSString*)product
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOption*)ruleOption
      ruleType:(NSString*)ruleType
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      webHookOption:(WebHookOption*)webHookOption { 
     self.baseContact = baseContact;               
     self.clientToken = clientToken;               
     self.dimension = dimension;               
     self.enabled = enabled;               
     self.noticeOption = noticeOption;               
     self.product = product;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.tags = tags;               
     self.webHookOption = webHookOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self baseContact])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self baseContact] count]; i++) {
            BaseContact* item = [[self baseContact] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"baseContact"];
    }
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self noticeOption])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self noticeOption] count]; i++) {
            NoticeOption* item = [[self noticeOption] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"noticeOption"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self webHookOption])
    {
        [result setValue:[[self webHookOption] dictionary]forKey:@"webHookOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* baseContactArray = [dictionary objectForKey:@"baseContact"];
    if(baseContactArray&&![baseContactArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [baseContactArray count];i++)
        {
            BaseContact* item = [[BaseContact alloc]initWithDic:[baseContactArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.baseContact = propertyArray;
    }
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    NSArray* noticeOptionArray = [dictionary objectForKey:@"noticeOption"];
    if(noticeOptionArray&&![noticeOptionArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [noticeOptionArray count];i++)
        {
            NoticeOption* item = [[NoticeOption alloc]initWithDic:[noticeOptionArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.noticeOption = propertyArray;
    }
    self.product = [dictionary objectForKey:@"product"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOption alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.webHookOption = [[WebHookOption alloc]initWithDic:[dictionary objectForKey:@"webHookOption"]];
    return self;
}
 @end
@implementation MetricDataItemCm
-(id) initWithData:(NSArray<DataPoint*>*) data
      metric:(MetricCm*)metric { 
     self.data = data;               
     self.metric = metric;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self data] count]; i++) {
            DataPoint* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    if([self metric])
    {
        [result setValue:[[self metric] dictionary]forKey:@"metric"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
            DataPoint* item = [[DataPoint alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    self.metric = [[MetricCm alloc]initWithDic:[dictionary objectForKey:@"metric"]];
    return self;
}
 @end
@implementation UpdateWidgetSpec
-(id) initWithAggregated:(NSString*) aggregated
      createdTime:(NSNumber*)createdTime
      dashboardId:(NSString*)dashboardId
      metrics:(NSArray<WidgetMetric*>*)metrics
      name:(NSString*)name
      position:(WidgetPosition*)position
      resources:(WidgetResources*)resources
      serviceCode:(NSString*)serviceCode
      topN:(NSNumber*)topN
      type:(NSString*)type
      updatedTime:(NSNumber*)updatedTime
      widgetId:(NSString*)widgetId { 
     self.aggregated = aggregated;               
     self.createdTime = createdTime;               
     self.dashboardId = dashboardId;               
     self.metrics = metrics;               
     self.name = name;               
     self.position = position;               
     self.resources = resources;               
     self.serviceCode = serviceCode;               
     self.topN = topN;               
     self.type = type;               
     self.updatedTime = updatedTime;               
     self.widgetId = widgetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregated])
    {
        [result setValue:[self aggregated] forKey:@"aggregated"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self dashboardId])
    {
        [result setValue:[self dashboardId] forKey:@"dashboardId"];
    }
    if([self metrics])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metrics] count]; i++) {
            WidgetMetric* item = [[self metrics] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metrics"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self position])
    {
        [result setValue:[[self position] dictionary]forKey:@"position"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self topN])
    {
        [result setValue:[self topN] forKey:@"topN"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self widgetId])
    {
        [result setValue:[self widgetId] forKey:@"widgetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregated = [dictionary objectForKey:@"aggregated"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.dashboardId = [dictionary objectForKey:@"dashboardId"];
    NSArray* metricsArray = [dictionary objectForKey:@"metrics"];
    if(metricsArray&&![metricsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricsArray count];i++)
        {
            WidgetMetric* item = [[WidgetMetric alloc]initWithDic:[metricsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metrics = propertyArray;
    }
    self.name = [dictionary objectForKey:@"name"];
    self.position = [[WidgetPosition alloc]initWithDic:[dictionary objectForKey:@"position"]];
    self.resources = [[WidgetResources alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.topN = [dictionary objectForKey:@"topN"];
    self.type = [dictionary objectForKey:@"type"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    self.widgetId = [dictionary objectForKey:@"widgetId"];
    return self;
}
 @end
@implementation DescribedAlarmHistory
-(id) initWithAlarmId:(NSString*) alarmId
      dimension:(NSString*)dimension
      dimensionName:(NSString*)dimensionName
      durationTimes:(NSNumber*)durationTimes
      noticeDurationTime:(NSNumber*)noticeDurationTime
      noticeLevel:(NSString*)noticeLevel
      noticeLevelTriggered:(NSString*)noticeLevelTriggered
      noticeTime:(NSString*)noticeTime
      product:(NSString*)product
      productName:(NSString*)productName
      receivers:(NSArray<NoticeReceiver*>*)receivers
      resourceId:(NSString*)resourceId
      rule:(BasicRuleDetail*)rule
      ruleType:(NSString*)ruleType
      status:(NSNumber*)status
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      value:(NSNumber*)value { 
     self.alarmId = alarmId;               
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.durationTimes = durationTimes;               
     self.noticeDurationTime = noticeDurationTime;               
     self.noticeLevel = noticeLevel;               
     self.noticeLevelTriggered = noticeLevelTriggered;               
     self.noticeTime = noticeTime;               
     self.product = product;               
     self.productName = productName;               
     self.receivers = receivers;               
     self.resourceId = resourceId;               
     self.rule = rule;               
     self.ruleType = ruleType;               
     self.status = status;               
     self.tags = tags;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmId])
    {
        [result setValue:[self alarmId] forKey:@"alarmId"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self durationTimes])
    {
        [result setValue:[self durationTimes] forKey:@"durationTimes"];
    }
    if([self noticeDurationTime])
    {
        [result setValue:[self noticeDurationTime] forKey:@"noticeDurationTime"];
    }
    if([self noticeLevel])
    {
        [result setValue:[self noticeLevel] forKey:@"noticeLevel"];
    }
    if([self noticeLevelTriggered])
    {
        [result setValue:[self noticeLevelTriggered] forKey:@"noticeLevelTriggered"];
    }
    if([self noticeTime])
    {
        [result setValue:[self noticeTime] forKey:@"noticeTime"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self receivers])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self receivers] count]; i++) {
            NoticeReceiver* item = [[self receivers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"receivers"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self rule])
    {
        [result setValue:[[self rule] dictionary]forKey:@"rule"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmId = [dictionary objectForKey:@"alarmId"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.durationTimes = [dictionary objectForKey:@"durationTimes"];
    self.noticeDurationTime = [dictionary objectForKey:@"noticeDurationTime"];
    self.noticeLevel = [dictionary objectForKey:@"noticeLevel"];
    self.noticeLevelTriggered = [dictionary objectForKey:@"noticeLevelTriggered"];
    self.noticeTime = [dictionary objectForKey:@"noticeTime"];
    self.product = [dictionary objectForKey:@"product"];
    self.productName = [dictionary objectForKey:@"productName"];
    NSArray* receiversArray = [dictionary objectForKey:@"receivers"];
    if(receiversArray&&![receiversArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [receiversArray count];i++)
        {
            NoticeReceiver* item = [[NoticeReceiver alloc]initWithDic:[receiversArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.receivers = propertyArray;
    }
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.rule = [[BasicRuleDetail alloc]initWithDic:[dictionary objectForKey:@"rule"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.status = [dictionary objectForKey:@"status"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation DescribeMetricDataSpec
-(id) initWithAggrType:(NSString*) aggrType
      dimension:(NSString*)dimension
      downSampleType:(NSString*)downSampleType
      endTime:(NSString*)endTime
      groupBy:(NSNumber*)groupBy
      rate:(NSNumber*)rate
      resourceId:(NSString*)resourceId
      serviceCode:(NSString*)serviceCode
      startTime:(NSString*)startTime
      tags:(NSArray<MonitorTagFilter*>*)tags
      timeInterval:(NSString*)timeInterval { 
     self.aggrType = aggrType;               
     self.dimension = dimension;               
     self.downSampleType = downSampleType;               
     self.endTime = endTime;               
     self.groupBy = groupBy;               
     self.rate = rate;               
     self.resourceId = resourceId;               
     self.serviceCode = serviceCode;               
     self.startTime = startTime;               
     self.tags = tags;               
     self.timeInterval = timeInterval;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggrType])
    {
        [result setValue:[self aggrType] forKey:@"aggrType"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self downSampleType])
    {
        [result setValue:[self downSampleType] forKey:@"downSampleType"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self groupBy])
    {
        [result setValue:[self groupBy] forKey:@"groupBy"];
    }
    if([self rate])
    {
        [result setValue:[self rate] forKey:@"rate"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            MonitorTagFilter* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggrType = [dictionary objectForKey:@"aggrType"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.downSampleType = [dictionary objectForKey:@"downSampleType"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.groupBy = [dictionary objectForKey:@"groupBy"];
    self.rate = [dictionary objectForKey:@"rate"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            MonitorTagFilter* item = [[MonitorTagFilter alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    return self;
}
 @end
@implementation BaseRule
-(id) initWithAutoScalingPolicyId:(NSString*) autoScalingPolicyId
      calculateUnit:(NSString*)calculateUnit
      calculation:(NSString*)calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      noticeLevel:(NoticeLevel*)noticeLevel
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleName:(NSString*)ruleName
      ruleType:(NSNumber*)ruleType
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.autoScalingPolicyId = autoScalingPolicyId;               
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.noticeLevel = noticeLevel;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.ruleName = ruleName;               
     self.ruleType = ruleType;               
     self.tags = tags;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self autoScalingPolicyId])
    {
        [result setValue:[self autoScalingPolicyId] forKey:@"autoScalingPolicyId"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.autoScalingPolicyId = [dictionary objectForKey:@"autoScalingPolicyId"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation CreateCmAlarmSpec
-(id) initWithClientToken:(NSString*) clientToken
      createCmAlarmSpecValue:(CreateCmAlarmParam*)createCmAlarmSpecValue { 
     self.clientToken = clientToken;               
     self.createCmAlarmSpecValue = createCmAlarmSpecValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self createCmAlarmSpecValue])
    {
        [result setValue:[[self createCmAlarmSpecValue] dictionary]forKey:@"createCmAlarmSpec"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.createCmAlarmSpecValue = [[CreateCmAlarmParam alloc]initWithDic:[dictionary objectForKey:@"createCmAlarmSpec"]];
    return self;
}
 @end
@implementation CreateTemplateSpec
-(id) initWithClientToken:(NSString*) clientToken
      descriptionValue:(NSString*)descriptionValue
      ruleServiceCode:(NSString*)ruleServiceCode
      serviceCode:(NSString*)serviceCode
      templateName:(NSString*)templateName
      templateRules:(NSArray<BaseRuleT*>*)templateRules { 
     self.clientToken = clientToken;               
     self.descriptionValue = descriptionValue;               
     self.ruleServiceCode = ruleServiceCode;               
     self.serviceCode = serviceCode;               
     self.templateName = templateName;               
     self.templateRules = templateRules;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self ruleServiceCode])
    {
        [result setValue:[self ruleServiceCode] forKey:@"ruleServiceCode"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    if([self templateRules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateRules] count]; i++) {
            BaseRuleT* item = [[self templateRules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateRules"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.ruleServiceCode = [dictionary objectForKey:@"ruleServiceCode"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    NSArray* templateRulesArray = [dictionary objectForKey:@"templateRules"];
    if(templateRulesArray&&![templateRulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateRulesArray count];i++)
        {
            BaseRuleT* item = [[BaseRuleT alloc]initWithDic:[templateRulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateRules = propertyArray;
    }
    return self;
}
 @end
@implementation StatsItem
-(id) initWithAggregateFunc:(NSString*) aggregateFunc
      calculateUnit:(NSString*)calculateUnit
      dps:(NSArray<DataPoint*>*)dps
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.aggregateFunc = aggregateFunc;               
     self.calculateUnit = calculateUnit;               
     self.dps = dps;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregateFunc])
    {
        [result setValue:[self aggregateFunc] forKey:@"aggregateFunc"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self dps])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self dps] count]; i++) {
            DataPoint* item = [[self dps] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dps"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregateFunc = [dictionary objectForKey:@"aggregateFunc"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    NSArray* dpsArray = [dictionary objectForKey:@"dps"];
    if(dpsArray&&![dpsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dpsArray count];i++)
        {
            DataPoint* item = [[DataPoint alloc]initWithDic:[dpsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.dps = propertyArray;
    }
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation GroupAlarm
-(id) initWithAlarmId:(NSString*) alarmId
      baseContact:(NSArray<BaseContact*>*)baseContact
      createTime:(NSString*)createTime
      enabled:(NSNumber*)enabled
      noticeOption:(NSArray<NoticeOption*>*)noticeOption
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOption*)ruleOption
      ruleType:(NSString*)ruleType
      ruleVersion:(NSString*)ruleVersion
      serviceCode:(NSString*)serviceCode
      status:(NSNumber*)status
      webHookOption:(WebHookOption*)webHookOption { 
     self.alarmId = alarmId;               
     self.baseContact = baseContact;               
     self.createTime = createTime;               
     self.enabled = enabled;               
     self.noticeOption = noticeOption;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.ruleVersion = ruleVersion;               
     self.serviceCode = serviceCode;               
     self.status = status;               
     self.webHookOption = webHookOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmId])
    {
        [result setValue:[self alarmId] forKey:@"alarmId"];
    }
    if([self baseContact])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self baseContact] count]; i++) {
            BaseContact* item = [[self baseContact] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"baseContact"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self noticeOption])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self noticeOption] count]; i++) {
            NoticeOption* item = [[self noticeOption] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"noticeOption"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self ruleVersion])
    {
        [result setValue:[self ruleVersion] forKey:@"ruleVersion"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self webHookOption])
    {
        [result setValue:[[self webHookOption] dictionary]forKey:@"webHookOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmId = [dictionary objectForKey:@"alarmId"];
    NSArray* baseContactArray = [dictionary objectForKey:@"baseContact"];
    if(baseContactArray&&![baseContactArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [baseContactArray count];i++)
        {
            BaseContact* item = [[BaseContact alloc]initWithDic:[baseContactArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.baseContact = propertyArray;
    }
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    NSArray* noticeOptionArray = [dictionary objectForKey:@"noticeOption"];
    if(noticeOptionArray&&![noticeOptionArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [noticeOptionArray count];i++)
        {
            NoticeOption* item = [[NoticeOption alloc]initWithDic:[noticeOptionArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.noticeOption = propertyArray;
    }
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOption alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.ruleVersion = [dictionary objectForKey:@"ruleVersion"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.status = [dictionary objectForKey:@"status"];
    self.webHookOption = [[WebHookOption alloc]initWithDic:[dictionary objectForKey:@"webHookOption"]];
    return self;
}
 @end
@implementation UpdateAlarmResourcesSpec
-(id) initWithOperatorType:(NSNumber*) operatorType
      resourceOption:(ResourceOption*)resourceOption { 
     self.operatorType = operatorType;               
     self.resourceOption = resourceOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self operatorType])
    {
        [result setValue:[self operatorType] forKey:@"operatorType"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.operatorType = [dictionary objectForKey:@"operatorType"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    return self;
}
 @end
@implementation BatchUpdateWidgetSpec
-(id) initWithList:(NSArray<Widget*>*) list { 
     self.list = list;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self list] count]; i++) {
            Widget* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
            Widget* item = [[Widget alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    return self;
}
 @end
@implementation ChartDimensionDetail
-(id) initWithCharts:(NSArray<ChartDetail*>*) charts
      dimension:(NSString*)dimension
      dimensionName:(NSString*)dimensionName
      serviceCode:(NSString*)serviceCode
      serviceName:(NSString*)serviceName
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.charts = charts;               
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.serviceCode = serviceCode;               
     self.serviceName = serviceName;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self charts])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self charts] count]; i++) {
            ChartDetail* item = [[self charts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"charts"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self serviceName])
    {
        [result setValue:[self serviceName] forKey:@"serviceName"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* chartsArray = [dictionary objectForKey:@"charts"];
    if(chartsArray&&![chartsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [chartsArray count];i++)
        {
            ChartDetail* item = [[ChartDetail alloc]initWithDic:[chartsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.charts = propertyArray;
    }
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.serviceName = [dictionary objectForKey:@"serviceName"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation WidgetDataPointItem
-(id) initWithAggregate:(NSArray<StatsItem*>*) aggregate
      detail:(NSArray<StatsItem*>*)detail
      widgetId:(NSString*)widgetId { 
     self.aggregate = aggregate;               
     self.detail = detail;               
     self.widgetId = widgetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregate])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self aggregate] count]; i++) {
            StatsItem* item = [[self aggregate] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"aggregate"];
    }
    if([self detail])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self detail] count]; i++) {
            StatsItem* item = [[self detail] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"detail"];
    }
    if([self widgetId])
    {
        [result setValue:[self widgetId] forKey:@"widgetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* aggregateArray = [dictionary objectForKey:@"aggregate"];
    if(aggregateArray&&![aggregateArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [aggregateArray count];i++)
        {
            StatsItem* item = [[StatsItem alloc]initWithDic:[aggregateArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.aggregate = propertyArray;
    }
    NSArray* detailArray = [dictionary objectForKey:@"detail"];
    if(detailArray&&![detailArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [detailArray count];i++)
        {
            StatsItem* item = [[StatsItem alloc]initWithDic:[detailArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.detail = propertyArray;
    }
    self.widgetId = [dictionary objectForKey:@"widgetId"];
    return self;
}
 @end
@implementation ServiceCodeMetrics
-(id) initWithMetrics:(NSArray<MetricDetail*>*) metrics
      serviceCode:(NSString*)serviceCode { 
     self.metrics = metrics;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metrics])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self metrics] count]; i++) {
            MetricDetail* item = [[self metrics] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metrics"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* metricsArray = [dictionary objectForKey:@"metrics"];
    if(metricsArray&&![metricsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricsArray count];i++)
        {
            MetricDetail* item = [[MetricDetail alloc]initWithDic:[metricsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.metrics = propertyArray;
    }
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation TemplateRulesVoV2
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      createTime:(NSString*)createTime
      deleted:(NSNumber*)deleted
      downSample:(NSString*)downSample
      idValue:(NSNumber*)idValue
      metric:(NSString*)metric
      metricId:(NSNumber*)metricId
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      noticePeriod:(NSNumber*)noticePeriod
      operation:(NSString*)operation
      period:(NSNumber*)period
      ruleType:(NSNumber*)ruleType
      serviceCode:(NSString*)serviceCode
      tag:(NSString*)tag
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times
      updateTime:(NSString*)updateTime
      uuid:(NSString*)uuid { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.createTime = createTime;               
     self.deleted = deleted;               
     self.downSample = downSample;               
     self.idValue = idValue;               
     self.metric = metric;               
     self.metricId = metricId;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.noticePeriod = noticePeriod;               
     self.operation = operation;               
     self.period = period;               
     self.ruleType = ruleType;               
     self.serviceCode = serviceCode;               
     self.tag = tag;               
     self.tags = tags;               
     self.threshold = threshold;               
     self.times = times;               
     self.updateTime = updateTime;               
     self.uuid = uuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self deleted])
    {
        [result setValue:[self deleted] forKey:@"deleted"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricId])
    {
        [result setValue:[self metricId] forKey:@"metricId"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.deleted = [dictionary objectForKey:@"deleted"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricId = [dictionary objectForKey:@"metricId"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.tag = [dictionary objectForKey:@"tag"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
}
 @end
@implementation UpdateTemplateSpec
-(id) initWithDescription:(NSString*) descriptionValue
      ruleServiceCode:(NSString*)ruleServiceCode
      serviceCode:(NSString*)serviceCode
      templateId:(NSNumber*)templateId
      templateName:(NSString*)templateName
      templateRules:(NSArray<BaseRuleT*>*)templateRules { 
     self.descriptionValue = descriptionValue;               
     self.ruleServiceCode = ruleServiceCode;               
     self.serviceCode = serviceCode;               
     self.templateId = templateId;               
     self.templateName = templateName;               
     self.templateRules = templateRules;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self ruleServiceCode])
    {
        [result setValue:[self ruleServiceCode] forKey:@"ruleServiceCode"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    if([self templateRules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateRules] count]; i++) {
            BaseRuleT* item = [[self templateRules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateRules"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.ruleServiceCode = [dictionary objectForKey:@"ruleServiceCode"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    NSArray* templateRulesArray = [dictionary objectForKey:@"templateRules"];
    if(templateRulesArray&&![templateRulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateRulesArray count];i++)
        {
            BaseRuleT* item = [[BaseRuleT alloc]initWithDic:[templateRulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateRules = propertyArray;
    }
    return self;
}
 @end
@implementation Product
-(id) initWithDimensions:(NSArray<Dimension*>*) dimensions
      productValue:(NSString*)productValue
      productName:(NSString*)productName
      serviceCode:(NSString*)serviceCode
      tagServiceCode:(NSString*)tagServiceCode
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.dimensions = dimensions;               
     self.productValue = productValue;               
     self.productName = productName;               
     self.serviceCode = serviceCode;               
     self.tagServiceCode = tagServiceCode;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dimensions])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self dimensions] count]; i++) {
            Dimension* item = [[self dimensions] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dimensions"];
    }
    if([self productValue])
    {
        [result setValue:[self productValue] forKey:@"product"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tagServiceCode])
    {
        [result setValue:[self tagServiceCode] forKey:@"tagServiceCode"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dimensionsArray = [dictionary objectForKey:@"dimensions"];
    if(dimensionsArray&&![dimensionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dimensionsArray count];i++)
        {
            Dimension* item = [[Dimension alloc]initWithDic:[dimensionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.dimensions = propertyArray;
    }
    self.productValue = [dictionary objectForKey:@"product"];
    self.productName = [dictionary objectForKey:@"productName"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.tagServiceCode = [dictionary objectForKey:@"tagServiceCode"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation ResourceOption
-(id) initWithResourceItems:(NSArray<ResourceItem*>*) resourceItems
      tagsOption:(TagsOption*)tagsOption { 
     self.resourceItems = resourceItems;               
     self.tagsOption = tagsOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceItems])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resourceItems] count]; i++) {
            ResourceItem* item = [[self resourceItems] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resourceItems"];
    }
    if([self tagsOption])
    {
        [result setValue:[[self tagsOption] dictionary]forKey:@"tagsOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* resourceItemsArray = [dictionary objectForKey:@"resourceItems"];
    if(resourceItemsArray&&![resourceItemsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourceItemsArray count];i++)
        {
            ResourceItem* item = [[ResourceItem alloc]initWithDic:[resourceItemsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resourceItems = propertyArray;
    }
    self.tagsOption = [[TagsOption alloc]initWithDic:[dictionary objectForKey:@"tagsOption"]];
    return self;
}
 @end
@implementation RuleOptionDetail
-(id) initWithRules:(NSArray<BasicRuleDetail*>*) rules
      templateOption:(TemplateOption*)templateOption { 
     self.rules = rules;               
     self.templateOption = templateOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self rules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self rules] count]; i++) {
            BasicRuleDetail* item = [[self rules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"rules"];
    }
    if([self templateOption])
    {
        [result setValue:[[self templateOption] dictionary]forKey:@"templateOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* rulesArray = [dictionary objectForKey:@"rules"];
    if(rulesArray&&![rulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [rulesArray count];i++)
        {
            BasicRuleDetail* item = [[BasicRuleDetail alloc]initWithDic:[rulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.rules = propertyArray;
    }
    self.templateOption = [[TemplateOption alloc]initWithDic:[dictionary objectForKey:@"templateOption"]];
    return self;
}
 @end
@implementation UpdateTemplateRequestV2
-(id) initWithDescription:(NSString*) descriptionValue
      dimension:(NSString*)dimension
      product:(NSString*)product
      templateName:(NSString*)templateName
      templateRules:(NSArray<BasicRule*>*)templateRules
      templateUuid:(NSString*)templateUuid { 
     self.descriptionValue = descriptionValue;               
     self.dimension = dimension;               
     self.product = product;               
     self.templateName = templateName;               
     self.templateRules = templateRules;               
     self.templateUuid = templateUuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    if([self templateRules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateRules] count]; i++) {
            BasicRule* item = [[self templateRules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateRules"];
    }
    if([self templateUuid])
    {
        [result setValue:[self templateUuid] forKey:@"templateUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.product = [dictionary objectForKey:@"product"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    NSArray* templateRulesArray = [dictionary objectForKey:@"templateRules"];
    if(templateRulesArray&&![templateRulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateRulesArray count];i++)
        {
            BasicRule* item = [[BasicRule alloc]initWithDic:[templateRulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateRules = propertyArray;
    }
    self.templateUuid = [dictionary objectForKey:@"templateUuid"];
    return self;
}
 @end
@implementation DescribeGroupAlarm
-(id) initWithAlarmId:(NSString*) alarmId
      alarmStatus:(NSNumber*)alarmStatus
      alarmStatusList:(NSArray<NSNumber*>*)alarmStatusList
      createTime:(NSString*)createTime
      dimension:(NSString*)dimension
      dimensionName:(NSString*)dimensionName
      enabled:(NSNumber*)enabled
      product:(NSString*)product
      productName:(NSString*)productName
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOptionDetail*)ruleOption
      ruleType:(NSString*)ruleType
      ruleVersion:(NSString*)ruleVersion
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.alarmId = alarmId;               
     self.alarmStatus = alarmStatus;               
     self.alarmStatusList = alarmStatusList;               
     self.createTime = createTime;               
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.enabled = enabled;               
     self.product = product;               
     self.productName = productName;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.ruleVersion = ruleVersion;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmId])
    {
        [result setValue:[self alarmId] forKey:@"alarmId"];
    }
    if([self alarmStatus])
    {
        [result setValue:[self alarmStatus] forKey:@"alarmStatus"];
    }
    if([self alarmStatusList])
    {
        [result setValue:[self alarmStatusList] forKey:@"alarmStatusList"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self ruleVersion])
    {
        [result setValue:[self ruleVersion] forKey:@"ruleVersion"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmId = [dictionary objectForKey:@"alarmId"];
    self.alarmStatus = [dictionary objectForKey:@"alarmStatus"];
    self.alarmStatusList = [dictionary objectForKey:@"alarmStatusList"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.product = [dictionary objectForKey:@"product"];
    self.productName = [dictionary objectForKey:@"productName"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOptionDetail alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.ruleVersion = [dictionary objectForKey:@"ruleVersion"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation TemplateVoV2
-(id) initWithCreateTime:(NSString*) createTime
      descriptionValue:(NSString*)descriptionValue
      dimension:(NSString*)dimension
      dimensionName:(NSString*)dimensionName
      linkPolicyCount:(NSNumber*)linkPolicyCount
      linkPolicyInfos:(NSArray<LinkPolicyInfo*>*)linkPolicyInfos
      pin:(NSString*)pin
      product:(NSString*)product
      productName:(NSString*)productName
      rulesCount:(NSNumber*)rulesCount
      serviceCode:(NSString*)serviceCode
      templateId:(NSNumber*)templateId
      templateName:(NSString*)templateName
      templateRules:(NSArray<TemplateRulesVo*>*)templateRules
      templateRulesString:(NSArray<NSString*>*)templateRulesString
      templateType:(NSNumber*)templateType
      updateTime:(NSString*)updateTime
      uuid:(NSString*)uuid { 
     self.createTime = createTime;               
     self.descriptionValue = descriptionValue;               
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.linkPolicyCount = linkPolicyCount;               
     self.linkPolicyInfos = linkPolicyInfos;               
     self.pin = pin;               
     self.product = product;               
     self.productName = productName;               
     self.rulesCount = rulesCount;               
     self.serviceCode = serviceCode;               
     self.templateId = templateId;               
     self.templateName = templateName;               
     self.templateRules = templateRules;               
     self.templateRulesString = templateRulesString;               
     self.templateType = templateType;               
     self.updateTime = updateTime;               
     self.uuid = uuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self linkPolicyCount])
    {
        [result setValue:[self linkPolicyCount] forKey:@"linkPolicyCount"];
    }
    if([self linkPolicyInfos])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self linkPolicyInfos] count]; i++) {
            LinkPolicyInfo* item = [[self linkPolicyInfos] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"linkPolicyInfos"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self rulesCount])
    {
        [result setValue:[self rulesCount] forKey:@"rulesCount"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    if([self templateRules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self templateRules] count]; i++) {
            TemplateRulesVo* item = [[self templateRules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"templateRules"];
    }
    if([self templateRulesString])
    {
        [result setValue:[self templateRulesString] forKey:@"templateRulesString"];
    }
    if([self templateType])
    {
        [result setValue:[self templateType] forKey:@"templateType"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.linkPolicyCount = [dictionary objectForKey:@"linkPolicyCount"];
    NSArray* linkPolicyInfosArray = [dictionary objectForKey:@"linkPolicyInfos"];
    if(linkPolicyInfosArray&&![linkPolicyInfosArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [linkPolicyInfosArray count];i++)
        {
            LinkPolicyInfo* item = [[LinkPolicyInfo alloc]initWithDic:[linkPolicyInfosArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.linkPolicyInfos = propertyArray;
    }
    self.pin = [dictionary objectForKey:@"pin"];
    self.product = [dictionary objectForKey:@"product"];
    self.productName = [dictionary objectForKey:@"productName"];
    self.rulesCount = [dictionary objectForKey:@"rulesCount"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    NSArray* templateRulesArray = [dictionary objectForKey:@"templateRules"];
    if(templateRulesArray&&![templateRulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [templateRulesArray count];i++)
        {
            TemplateRulesVo* item = [[TemplateRulesVo alloc]initWithDic:[templateRulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.templateRules = propertyArray;
    }
    self.templateRulesString = [dictionary objectForKey:@"templateRulesString"];
    self.templateType = [dictionary objectForKey:@"templateType"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
}
 @end
@implementation DescribeTemplatesByTemplateIDResponseEnd
-(id) initWithTemplate:(TemplateVo*) template { 
     self.template = template;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self template])
    {
        [result setValue:[[self template] dictionary]forKey:@"template"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.template = [[TemplateVo alloc]initWithDic:[dictionary objectForKey:@"template"]];
    return self;
}
 @end
@implementation UpdateAlarmSpec
-(id) initWithBaseContact:(NSArray<BaseContact*>*) baseContact
      dimension:(NSString*)dimension
      enabled:(NSNumber*)enabled
      noticeOption:(NSArray<NoticeOption*>*)noticeOption
      product:(NSString*)product
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOption*)ruleOption
      ruleType:(NSString*)ruleType
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      webHookOption:(WebHookOption*)webHookOption { 
     self.baseContact = baseContact;               
     self.dimension = dimension;               
     self.enabled = enabled;               
     self.noticeOption = noticeOption;               
     self.product = product;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.tags = tags;               
     self.webHookOption = webHookOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self baseContact])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self baseContact] count]; i++) {
            BaseContact* item = [[self baseContact] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"baseContact"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self noticeOption])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self noticeOption] count]; i++) {
            NoticeOption* item = [[self noticeOption] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"noticeOption"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self webHookOption])
    {
        [result setValue:[[self webHookOption] dictionary]forKey:@"webHookOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* baseContactArray = [dictionary objectForKey:@"baseContact"];
    if(baseContactArray&&![baseContactArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [baseContactArray count];i++)
        {
            BaseContact* item = [[BaseContact alloc]initWithDic:[baseContactArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.baseContact = propertyArray;
    }
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    NSArray* noticeOptionArray = [dictionary objectForKey:@"noticeOption"];
    if(noticeOptionArray&&![noticeOptionArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [noticeOptionArray count];i++)
        {
            NoticeOption* item = [[NoticeOption alloc]initWithDic:[noticeOptionArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.noticeOption = propertyArray;
    }
    self.product = [dictionary objectForKey:@"product"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOption alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.webHookOption = [[WebHookOption alloc]initWithDic:[dictionary objectForKey:@"webHookOption"]];
    return self;
}
 @end
@implementation DescribeAlarmHistoryResponseEnd
-(id) initWithAlarmHistoryList:(NSArray<DescribedAlarmHistory*>*) alarmHistoryList
      total:(NSNumber*)total { 
     self.alarmHistoryList = alarmHistoryList;               
     self.total = total;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmHistoryList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self alarmHistoryList] count]; i++) {
            DescribedAlarmHistory* item = [[self alarmHistoryList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"alarmHistoryList"];
    }
    if([self total])
    {
        [result setValue:[self total] forKey:@"total"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* alarmHistoryListArray = [dictionary objectForKey:@"alarmHistoryList"];
    if(alarmHistoryListArray&&![alarmHistoryListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [alarmHistoryListArray count];i++)
        {
            DescribedAlarmHistory* item = [[DescribedAlarmHistory alloc]initWithDic:[alarmHistoryListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.alarmHistoryList = propertyArray;
    }
    self.total = [dictionary objectForKey:@"total"];
    return self;
}
 @end
@implementation DescribeMetricsForCreateAlarmEnd
-(id) initWithServiceCodeList:(NSArray<ServiceCodeMetrics*>*) serviceCodeList { 
     self.serviceCodeList = serviceCodeList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCodeList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self serviceCodeList] count]; i++) {
            ServiceCodeMetrics* item = [[self serviceCodeList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"serviceCodeList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* serviceCodeListArray = [dictionary objectForKey:@"serviceCodeList"];
    if(serviceCodeListArray&&![serviceCodeListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [serviceCodeListArray count];i++)
        {
            ServiceCodeMetrics* item = [[ServiceCodeMetrics alloc]initWithDic:[serviceCodeListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.serviceCodeList = propertyArray;
    }
    return self;
}
 @end
 
 


